diff options
author | Chris Dyer <redpony@gmail.com> | 2013-11-13 11:22:24 -0800 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2013-11-13 11:22:24 -0800 |
commit | 9be8d89b5a4065a81b26d8af1f3443d152e7922a (patch) | |
tree | 237090ff519a0419c3ba379ec3a6884f05caa6c2 /extractor/rule_factory_test.cc | |
parent | 8a24bb77bc2e9fd17a6f6529a2942cde96a6af49 (diff) | |
parent | 4a9449a564e626fe004200b730bfaa44d6152e0f (diff) |
Merge pull request #27 from pks/master
Tidying (soft) syntax features; loo for C++ extractor; updates for dtrain
Diffstat (limited to 'extractor/rule_factory_test.cc')
-rw-r--r-- | extractor/rule_factory_test.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extractor/rule_factory_test.cc b/extractor/rule_factory_test.cc index 08af3dcd..f26cc567 100644 --- a/extractor/rule_factory_test.cc +++ b/extractor/rule_factory_test.cc @@ -76,7 +76,9 @@ TEST_F(RuleFactoryTest, TestGetGrammarDifferentWords) { .WillRepeatedly(Return(PhraseLocation(0, 1))); vector<int> word_ids = {2, 3, 4}; - Grammar grammar = factory->GetGrammar(word_ids); + unordered_set<int> blacklisted_sentence_ids; + shared_ptr<DataArray> source_data_array; + Grammar grammar = factory->GetGrammar(word_ids, blacklisted_sentence_ids, source_data_array); EXPECT_EQ(feature_names, grammar.GetFeatureNames()); EXPECT_EQ(7, grammar.GetRules().size()); } @@ -94,7 +96,9 @@ TEST_F(RuleFactoryTest, TestGetGrammarRepeatingWords) { .WillRepeatedly(Return(PhraseLocation(0, 1))); vector<int> word_ids = {2, 3, 4, 2, 3}; - Grammar grammar = factory->GetGrammar(word_ids); + unordered_set<int> blacklisted_sentence_ids; + shared_ptr<DataArray> source_data_array; + Grammar grammar = factory->GetGrammar(word_ids, blacklisted_sentence_ids, source_data_array); EXPECT_EQ(feature_names, grammar.GetFeatureNames()); EXPECT_EQ(28, grammar.GetRules().size()); } |