diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-18 16:19:32 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-18 16:19:32 +0200 |
commit | f9106c8353aeaf6456a3eb0ea0c1e429f5de7650 (patch) | |
tree | 9b4c2baad153d189821633ef6649647d0992a1fa /test | |
parent | 33fda7f79c02b8ef152b88a11f3810c9a25a7381 (diff) |
integration
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_hg.rb (renamed from test/hg.rb) | 1 | ||||
-rwxr-xr-x | test/test_parse.rb (renamed from test/parse.rb) | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/hg.rb b/test/test_hg.rb index 16e6b6f..420d77f 100755 --- a/test/hg.rb +++ b/test/test_hg.rb @@ -7,6 +7,7 @@ def main # viterbi semiring = ViterbiSemiring.new hypergraph, nodes_by_id = HG::read_hypergraph_from_json('../example/toy/toy.json', semiring, true) + #hypergraph, nodes_by_id = HG::read_hypergraph_from_json('../example/toy/toy-test.json', semiring, true) #hypergraph, nodes_by_id = HG::read_hypergraph_from_json('../example/glue/glue.json', semiring, true) #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 diff --git a/test/parse.rb b/test/test_parse.rb index e139ea4..c3be5ae 100755 --- a/test/parse.rb +++ b/test/test_parse.rb @@ -12,6 +12,7 @@ def main STDERR.write "> reading grammar\n" grammar = Grammar::Grammar.new '../example/toy/grammar' + #grammar = Grammar::Grammar.new '../example/toy/grammar-test' #grammar = Grammar::Grammar.new '../example/glue/grammar' #grammar = Grammar::Grammar.new '../example/3/grammar.3.gz' @@ -39,7 +40,8 @@ def main if !weights weights = SparseVector.new end - puts passive_chart.to_json weights + + puts passive_chart.to_hg.to_json weights end |