summaryrefslogtreecommitdiff
path: root/test.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-04 20:26:06 +0200
committerPatrick Simianer <p@simianer.de>2014-06-04 20:26:06 +0200
commita10db22ce00bd004682a00322b4d177b694082b7 (patch)
tree1a97ab371137cd459418f12db00237f0039fada1 /test.rb
parentdbc15de7a63b939d7c3c51c39b34286aed56739f (diff)
refactoring, e.g. edges have scores, not weights
Diffstat (limited to 'test.rb')
-rwxr-xr-xtest.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.rb b/test.rb
index bc2ed30..d9fbdfa 100755
--- a/test.rb
+++ b/test.rb
@@ -5,7 +5,7 @@ require_relative 'hg'
semiring = ViterbiSemiring.new
hypergraph, nodes_by_id = HG::read_hypergraph_from_json('example/json/test.json', semiring, true)
-path, score = HG::viterbi_path hypergraph, nodes_by_id[-1], semiring
+#path, score = HG::viterbi_path hypergraph, nodes_by_id[-1], semiring
#s = HG::derive path, path.last.rule.lhs, []
#puts "#{s.map { |i| i.word }.join ' '} ||| #{score}"
@@ -13,6 +13,6 @@ hypergraph.reset
paths = HG::all_paths hypergraph, nodes_by_id[-1]
paths.each { |p|
s = HG::derive p, p.last.rule.lhs, []
-puts "#{s.map { |i| i.word }.join ' '} ||| #{score}"
+ puts "#{s.map { |i| i.word }.join ' '}"
}