diff options
Diffstat (limited to 'test.rb')
-rwxr-xr-x | test.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test.rb b/test.rb deleted file mode 100755 index e65c9b3..0000000 --- a/test.rb +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env ruby - -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 -s = HG::derive path, path.last.head, [] -puts "#{s.map { |i| i.word }.join ' '}" -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 ' '}" -} - |