summaryrefslogtreecommitdiff
path: root/scripts/geoquery
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/geoquery')
-rwxr-xr-xscripts/geoquery/sigf_format.rb20
-rwxr-xr-xscripts/geoquery/test-nof-old-crawl.sh5
2 files changed, 25 insertions, 0 deletions
diff --git a/scripts/geoquery/sigf_format.rb b/scripts/geoquery/sigf_format.rb
new file mode 100755
index 0000000..9d0125b
--- /dev/null
+++ b/scripts/geoquery/sigf_format.rb
@@ -0,0 +1,20 @@
+#!/usr/bin/env ruby
+
+require 'nlp_ruby'
+
+
+gold = ReadFile.readlines_strip ARGV[0]
+i = -1
+while line = STDIN.gets
+ i += 1
+ line.strip!
+ a = [0, 0, 1]
+ if line==gold[i]
+ a[0] = 1
+ a[1] = 1
+ elsif line!=''
+ a[1] = 1
+ end
+ puts a.join " "
+end
+
diff --git a/scripts/geoquery/test-nof-old-crawl.sh b/scripts/geoquery/test-nof-old-crawl.sh
new file mode 100755
index 0000000..79c35a8
--- /dev/null
+++ b/scripts/geoquery/test-nof-old-crawl.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-crawl.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
+