diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-04-01 13:45:23 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-04-01 13:45:23 +0200 |
commit | be45f7b253c23757449103ffe3005107ce9169fa (patch) | |
tree | cd9bf6d12193bb8ffc1e8d4a610b5e0679703495 /scripts | |
parent | 00e2f9f227c28242ce97cfc7f86a953b84062d3f (diff) |
cv version
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/geoquery/query.rb | 4 | ||||
-rwxr-xr-x | scripts/geoquery/semparse.rb | 4 | ||||
-rwxr-xr-x | scripts/geoquery/test-nof-old.sh | 5 | ||||
-rwxr-xr-x | scripts/geoquery/test-nof.sh | 5 | ||||
-rwxr-xr-x | scripts/geoquery/test.sh | 5 | ||||
-rwxr-xr-x | scripts/geoquery/translate.sh | 4 |
6 files changed, 25 insertions, 2 deletions
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 + |