diff options
author | Patrick Simianer <p@simianer.de> | 2014-09-27 15:17:43 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-09-27 15:17:43 +0100 |
commit | f65e428784cfd2264f3fdfddd574c37acd38f54f (patch) | |
tree | 6a98f82964cbce52957a2d62f8b2c5b7ff8be095 /test | |
parent | f28694f9bdd5059050e420cca2ca2694cbb0dda4 (diff) |
cosmetic changes, bump to 1.1
Diffstat (limited to 'test')
-rw-r--r-- | test/hypergraph/hg-toy.json (renamed from test/hg/hg-toy.json) | 0 | ||||
-rw-r--r-- | test/hypergraph/hg.json (renamed from test/hg/hg.json) | 0 | ||||
-rwxr-xr-x | test/test_dag.rb | 1 | ||||
-rwxr-xr-x | test/test_hypergraph.rb (renamed from test/test_hg.rb) | 5 |
4 files changed, 2 insertions, 4 deletions
diff --git a/test/hg/hg-toy.json b/test/hypergraph/hg-toy.json index ab7eefc..ab7eefc 100644 --- a/test/hg/hg-toy.json +++ b/test/hypergraph/hg-toy.json diff --git a/test/hg/hg.json b/test/hypergraph/hg.json index 1c093bd..1c093bd 100644 --- a/test/hg/hg.json +++ b/test/hypergraph/hg.json diff --git a/test/test_dag.rb b/test/test_dag.rb index 5c3938b..3007657 100755 --- a/test/test_dag.rb +++ b/test/test_dag.rb @@ -3,7 +3,6 @@ require_relative '../lib/zipf' require 'test/unit' - class TestDAG < Test::Unit::TestCase def test_viterbi diff --git a/test/test_hg.rb b/test/test_hypergraph.rb index 667a3b8..c5add9f 100755 --- a/test/test_hg.rb +++ b/test/test_hypergraph.rb @@ -3,18 +3,17 @@ require_relative '../lib/zipf' require 'test/unit' - class TestHG < Test::Unit::TestCase def test_viterbi semiring = ViterbiSemiring.new - hypergraph, nodes_by_label, nodes_by_index = HG::read_hypergraph_from_json('test/hg/hg.json', semiring, true) + hypergraph, nodes_by_label, nodes_by_index = HG::read_hypergraph_from_json('test/hypergraph/hg.json', semiring, true) HG::viterbi hypergraph, nodes_by_label['root'], semiring assert_equal('Goal', nodes_by_index.last.cat) assert_equal(228.95, Math.log(nodes_by_index.last.score).round(2)) # do all operations in log space semiring = ViterbiLogSemiring.new - hypergraph, nodes_by_label, nodes_by_index = HG::read_hypergraph_from_json('test/hg/hg.json', semiring) + hypergraph, nodes_by_label, nodes_by_index = HG::read_hypergraph_from_json('test/hypergraph/hg.json', semiring) HG::viterbi hypergraph, nodes_by_label['root'], semiring assert_equal('Goal', nodes_by_index.last.cat) assert_equal(228.95, nodes_by_index.last.score.round(2)) |