diff options
Diffstat (limited to 'test.rb')
-rwxr-xr-x | test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 ' '}" } |