From be45f7b253c23757449103ffe3005107ce9169fa Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 1 Apr 2014 13:45:23 +0200 Subject: cv version --- scripts/geoquery/query.rb | 4 +++- scripts/geoquery/semparse.rb | 4 +++- scripts/geoquery/test-nof-old.sh | 5 +++++ scripts/geoquery/test-nof.sh | 5 +++++ scripts/geoquery/test.sh | 5 +++++ scripts/geoquery/translate.sh | 4 ++++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 scripts/geoquery/test-nof-old.sh create mode 100755 scripts/geoquery/test-nof.sh create mode 100755 scripts/geoquery/test.sh create mode 100755 scripts/geoquery/translate.sh (limited to 'scripts/geoquery') diff --git a/scripts/geoquery/query.rb b/scripts/geoquery/query.rb index 25cded5..3b4b681 100755 --- a/scripts/geoquery/query.rb +++ b/scripts/geoquery/query.rb @@ -1,9 +1,11 @@ #!/usr/bin/env ruby require 'nlp_ruby' -require_relative '../../cfg.rb' +require 'memcached' +require_relative ARGV[0] + while line = STDIN.gets puts `echo "execute_funql_query(#{line}, X)." | swipl -s #{EVAL_PL} 2>&1 | grep "X ="`.gsub('X = ','').strip end diff --git a/scripts/geoquery/semparse.rb b/scripts/geoquery/semparse.rb index 9858ade..45fe98c 100755 --- a/scripts/geoquery/semparse.rb +++ b/scripts/geoquery/semparse.rb @@ -1,9 +1,11 @@ #!/usr/bin/env ruby require 'nlp_ruby' -require_relative '../../cfg.rb' +require 'memcached' +require_relative ARGV[0] + while line = STDIN.gets puts `#{SMT_SEMPARSE} "#{line}"` end diff --git a/scripts/geoquery/test-nof-old.sh b/scripts/geoquery/test-nof-old.sh new file mode 100755 index 0000000..99a8241 --- /dev/null +++ b/scripts/geoquery/test-nof-old.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +/workspace/grounded/lampion/scripts/geoquery/translate.sh $1 $2 < /workspace/grounded/lampion/proper/d/split880.test-nof-old.in | tee $2.transl | /workspace/grounded/lampion/scripts/geoquery/semparse.rb $3 | tee $2.parsed | /workspace/grounded/lampion/scripts/geoquery/query.rb $3 > $2.output +/workspace/grounded/lampion/scripts/geoquery/eval.rb /workspace/grounded/lampion/proper/d/split880.test-nof.gold < $2.output > $2.result + diff --git a/scripts/geoquery/test-nof.sh b/scripts/geoquery/test-nof.sh new file mode 100755 index 0000000..786afc2 --- /dev/null +++ b/scripts/geoquery/test-nof.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +/workspace/grounded/lampion/scripts/geoquery/translate.sh $1 $2 < /workspace/grounded/lampion/proper/d/split880.test-nof.in | tee $2.transl | /workspace/grounded/lampion/scripts/geoquery/semparse.rb $3 | tee $2.parsed | /workspace/grounded/lampion/scripts/geoquery/query.rb $3 > $2.output +/workspace/grounded/lampion/scripts/geoquery/eval.rb /workspace/grounded/lampion/proper/d/split880.test-nof.gold < $2.output > $2.result + diff --git a/scripts/geoquery/test.sh b/scripts/geoquery/test.sh new file mode 100755 index 0000000..3ac8b2d --- /dev/null +++ b/scripts/geoquery/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +/workspace/grounded/lampion/scripts/geoquery/translate.sh $1 $2 < /workspace/grounded/lampion/proper/d/split880.test.in | tee $2.transl | /workspace/grounded/lampion/scripts/geoquery/semparse.rb $3 | tee $2.parsed | /workspace/grounded/lampion/scripts/geoquery/query.rb $3 > $2.output +/workspace/grounded/lampion/scripts/geoquery/eval.rb /workspace/grounded/lampion/proper/d/split880.test.gold < $2.output > $2.result + diff --git a/scripts/geoquery/translate.sh b/scripts/geoquery/translate.sh new file mode 100755 index 0000000..af15aa1 --- /dev/null +++ b/scripts/geoquery/translate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +/toolbox/cdec-dtrain/decoder/cdec -c $1 -w $2 2>/dev/null + -- cgit v1.2.3