summaryrefslogtreecommitdiff
path: root/extractor/grammar_extractor.h
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/grammar_extractor.h')
-rw-r--r--extractor/grammar_extractor.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/extractor/grammar_extractor.h b/extractor/grammar_extractor.h
index 243f33cf..5f87faa7 100644
--- a/extractor/grammar_extractor.h
+++ b/extractor/grammar_extractor.h
@@ -32,13 +32,19 @@ class GrammarExtractor {
bool use_baeza_yates,
bool require_tight_phrases);
+ // For testing only.
+ GrammarExtractor(shared_ptr<Vocabulary> vocabulary,
+ shared_ptr<HieroCachingRuleFactory> rule_factory);
+
Grammar GetGrammar(const string& sentence);
private:
+ vector<string> TokenizeSentence(const string& sentence);
+
vector<int> AnnotateWords(const vector<string>& words);
shared_ptr<Vocabulary> vocabulary;
- HieroCachingRuleFactory rule_factory;
+ shared_ptr<HieroCachingRuleFactory> rule_factory;
};
#endif