summaryrefslogtreecommitdiff
path: root/scripts/geoquery
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2014-04-01 13:45:23 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2014-04-01 13:45:23 +0200
commitbe45f7b253c23757449103ffe3005107ce9169fa (patch)
treecd9bf6d12193bb8ffc1e8d4a610b5e0679703495 /scripts/geoquery
parent00e2f9f227c28242ce97cfc7f86a953b84062d3f (diff)
cv version
Diffstat (limited to 'scripts/geoquery')
-rwxr-xr-xscripts/geoquery/query.rb4
-rwxr-xr-xscripts/geoquery/semparse.rb4
-rwxr-xr-xscripts/geoquery/test-nof-old.sh5
-rwxr-xr-xscripts/geoquery/test-nof.sh5
-rwxr-xr-xscripts/geoquery/test.sh5
-rwxr-xr-xscripts/geoquery/translate.sh4
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
+