summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-04-23 01:15:07 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-04-23 01:15:07 -0400
commitc1274cbf20c806c8dbe28c364e98323e1b342a02 (patch)
tree7fa52e7f6fbdec3ff534d39e704961d2260b27a8
parent9908eb169f40d32231454b62d5c150fcf4863d58 (diff)
fixes
-rw-r--r--decoder/hg_test.cc4
-rw-r--r--decoder/trule_test.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/decoder/hg_test.cc b/decoder/hg_test.cc
index d934036f..3be5b82d 100644
--- a/decoder/hg_test.cc
+++ b/decoder/hg_test.cc
@@ -327,8 +327,8 @@ TEST_F(HGTest,TestAddExpectations) {
SparseVector<prob_t> feat_exps;
prob_t z = InsideOutside<prob_t, EdgeProb,
SparseVector<prob_t>, EdgeFeaturesAndProbWeightFunction>(hg, &feat_exps);
- EXPECT_FLOAT_EQ(-2.5439765, feat_exps[FD::Convert("f1")] / z);
- EXPECT_FLOAT_EQ(-2.6357865, feat_exps[FD::Convert("f2")] / z);
+ EXPECT_FLOAT_EQ(-2.5439765, feat_exps.value(FD::Convert("f1")) / z);
+ EXPECT_FLOAT_EQ(-2.6357865, feat_exps.value(FD::Convert("f2")) / z);
cerr << feat_exps << endl;
cerr << "Z=" << z << endl;
}
diff --git a/decoder/trule_test.cc b/decoder/trule_test.cc
index 02a70764..dfb6d417 100644
--- a/decoder/trule_test.cc
+++ b/decoder/trule_test.cc
@@ -35,7 +35,7 @@ TEST_F(TRuleTest,TestFSubstitute) {
TEST_F(TRuleTest,TestPhrasetableRule) {
TRulePtr t(TRule::CreateRulePhrasetable("gato ||| cat ||| PhraseModel_0=-23.2;Foo=1;Bar=12"));
cerr << t->AsString() << endl;
- assert(t->scores_.num_active() == 3);
+ assert(t->scores_.size() == 3);
};