summaryrefslogtreecommitdiff
path: root/test/test_hg.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-07-20 15:08:12 +0200
committerPatrick Simianer <p@simianer.de>2014-07-20 15:08:12 +0200
commit08e9a6f71c80fc7327d1758312b40bd5ba763dc9 (patch)
tree93a027bbb3e34fd60cc8e5d030a443a7f665389f /test/test_hg.rb
parentf219bab21c07d02e7e54d557e23387bd93c9ce5f (diff)
a lot
Diffstat (limited to 'test/test_hg.rb')
-rwxr-xr-xtest/test_hg.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_hg.rb b/test/test_hg.rb
index 420d77f..67ff08a 100755
--- a/test/test_hg.rb
+++ b/test/test_hg.rb
@@ -12,6 +12,8 @@ def main
#hypergraph, nodes_by_id = HG::read_hypergraph_from_json('../example/3/3.json', semiring, true)
path, score = HG::viterbi_path hypergraph, nodes_by_id[-1], semiring
s = HG::derive path, path.last.head, []
+ hypergraph.nodes.each { |i| puts "#{i.id} #{i.score}" }
+ puts "---"
puts "#{s.map { |i| i.word }.join ' '}"
puts Math.log score
puts