summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-02-14 20:09:19 +0100
committerPatrick Simianer <p@simianer.de>2014-02-14 20:09:19 +0100
commit7324d02ea20dbae4639a0431815090b37d1cf0c9 (patch)
treee75496e0522f55bdcc0f165bd2adb9b7d70af452
parentbc8c6fac34b61ed71fddb0af299090bea56665b7 (diff)
fix
-rw-r--r--lib/nlp_ruby/Translation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nlp_ruby/Translation.rb b/lib/nlp_ruby/Translation.rb
index 05cb1a8..3759a1d 100644
--- a/lib/nlp_ruby/Translation.rb
+++ b/lib/nlp_ruby/Translation.rb
@@ -22,7 +22,7 @@ class Translation
end
@id = id.to_i
@f = SparseVector.from_kv features
- @scores['decoder'] = score.to_f
+ @scores[:decoder] = score.to_f
@rank = rank
end
@@ -33,7 +33,7 @@ class Translation
end
def to_s include_features=true
- [@id, @s, @f.to_kv('=', ' '), @scores['decoder']].join(' ||| ') if include_features
+ [@id, @s, @f.to_kv('=', ' '), @scores[:decoder]].join(' ||| ') if include_features
[@id, @s, @scores[:decoder]].join(' ||| ') if !include_features
end