diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-03-03 19:17:40 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-03-03 19:17:40 +0100 |
commit | 38bbcbd52cfd6dd6d7d20148e7fa0a760af90f0a (patch) | |
tree | dce78bdba295a47d38a21539ba227df4b725f425 | |
parent | ce1df5c58fe812334ace1299f2df6e1a371b55cb (diff) |
cfg
-rw-r--r-- | cfg.rb | 7 | ||||
-rwxr-xr-x | lampion.rb | 11 | ||||
-rwxr-xr-x | scripts/geoquery/query.rb | 3 | ||||
-rwxr-xr-x | scripts/geoquery/semparse.rb | 3 |
4 files changed, 12 insertions, 12 deletions
@@ -0,0 +1,7 @@ +# this is the 'fixed' version of eval.pl +EVAL_PL = '/workspace/grounded/wasp-1.0/data/geo-funql/eval/eval.pl' +# edit here to change the parser +SMT_SEMPARSE = 'python /workspace/grounded/smt-semparse-cp/decode_sentence.py /workspace/grounded/smt-semparse-cp/working/full_dataset' +# cdec binary +CDEC_BIN = '/toolbox/cdec-dtrain/decoder/cdec' + @@ -5,14 +5,9 @@ require 'trollop' require 'tempfile' require 'memcached' require_relative './hopefear' +require_relative './cfg.rb' -# edit here to change the parser -SMT_SEMPARSE = 'python /workspace/grounded/smt-semparse-cp/decode_sentence.py /workspace/grounded/smt-semparse-cp/working/tgttosrc' - -# this is the 'fixed' version of eval.pl -EVAL_PL = '/workspace/grounded/wasp-1.0/data/geo-funql/eval/eval.pl' - -# memcached hast to be running +# memcached has to be running $cache = Memcached.new('localhost:11211') @@ -162,7 +157,7 @@ def main tmp_file.close # get kbest list - kbest = cdec_kbest '/toolbox/cdec-dtrain/decoder/cdec', i, cfg[:cdec_ini], tmp_file_path, cfg[:k] + kbest = cdec_kbest CDEC_BIN, i, cfg[:cdec_ini], tmp_file_path, cfg[:k] kbest_sz += kbest.size STDERR.write "\n=================\n" diff --git a/scripts/geoquery/query.rb b/scripts/geoquery/query.rb index 9cec355..25cded5 100755 --- a/scripts/geoquery/query.rb +++ b/scripts/geoquery/query.rb @@ -1,10 +1,9 @@ #!/usr/bin/env ruby require 'nlp_ruby' +require_relative '../../cfg.rb' -EVAL_PL='/workspace/grounded/wasp-1.0/data/geo-funql/eval/eval.pl' - 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 ebcbfbe..9858ade 100755 --- a/scripts/geoquery/semparse.rb +++ b/scripts/geoquery/semparse.rb @@ -1,10 +1,9 @@ #!/usr/bin/env ruby require 'nlp_ruby' +require_relative '../../cfg.rb' -SMT_SEMPARSE = 'python /workspace/grounded/smt-semparse-cp/decode_sentence.py /workspace/grounded/smt-semparse-cp/working/full_dataset' - while line = STDIN.gets puts `#{SMT_SEMPARSE} "#{line}"` end |