summaryrefslogtreecommitdiff
path: root/lib/nlp_ruby/cdec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nlp_ruby/cdec.rb')
-rw-r--r--lib/nlp_ruby/cdec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/nlp_ruby/cdec.rb b/lib/nlp_ruby/cdec.rb
index 1080f14..46651a3 100644
--- a/lib/nlp_ruby/cdec.rb
+++ b/lib/nlp_ruby/cdec.rb
@@ -8,6 +8,8 @@ CDEC_BINARY = "/toolbox/cdec-dtrain/decoder/cdec"
def CDEC::kbest input, ini, weights, k, unique=true
+ puts "asdf #{`cat #{weights}`}"
+ puts "echo \"#{input}\" | #{CDEC_BINARY} -c #{ini} -w #{weights} -k #{k} -r 2>/dev/null"
o, s = Open3.capture2 "echo \"#{input}\" | #{CDEC_BINARY} -c #{ini} -w #{weights} -k #{k} -r 2>/dev/null"
j = -1
ret = []