summaryrefslogtreecommitdiff
path: root/test_hg.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-12 11:22:44 +0200
committerPatrick Simianer <p@simianer.de>2014-06-12 11:22:44 +0200
commita981df066484f799637c8a0b88209110038e3148 (patch)
treeee9d14e1e99d0aad06854ea8967587aca22e6936 /test_hg.rb
parent719a996f9acfefa5ff3dc49d36e0ef6e57e74fe3 (diff)
feature vectors
Diffstat (limited to 'test_hg.rb')
-rwxr-xr-xtest_hg.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/test_hg.rb b/test_hg.rb
index e65c9b3..78871aa 100755
--- a/test_hg.rb
+++ b/test_hg.rb
@@ -8,12 +8,13 @@ hypergraph, nodes_by_id = HG::read_hypergraph_from_json('example/json/test.json'
path, score = HG::viterbi_path hypergraph, nodes_by_id[-1], semiring
s = HG::derive path, path.last.head, []
puts "#{s.map { |i| i.word }.join ' '}"
+puts Math.log score
puts
-hypergraph.reset
-paths = HG::all_paths hypergraph, nodes_by_id[-1]
-paths.each { |p|
- s = HG::derive p, p.last.head, []
- puts "#{s.map { |i| i.word }.join ' '}"
-}
+#hypergraph.reset
+#paths = HG::all_paths hypergraph, nodes_by_id[-1]
+#paths.each { |p|
+# s = HG::derive p, p.last.head, []
+# puts "#{s.map { |i| i.word }.join ' '}"
+#}