summaryrefslogtreecommitdiff
path: root/extractor/rule_factory.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-03-07 22:49:46 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-03-07 22:49:46 +0000
commit092b7cf020680e949d6956ec6ef2cf012faccd86 (patch)
tree4bc074572925a10b63928639be244a60f153f7ac /extractor/rule_factory.cc
parentd7271db305bd1aeaf9c3d9ac1043546fec22a402 (diff)
Parallelized grammar extraction.
Diffstat (limited to 'extractor/rule_factory.cc')
-rw-r--r--extractor/rule_factory.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/extractor/rule_factory.cc b/extractor/rule_factory.cc
index 51f85c30..a5505ced 100644
--- a/extractor/rule_factory.cc
+++ b/extractor/rule_factory.cc
@@ -105,8 +105,8 @@ Grammar HieroCachingRuleFactory::GetGrammar(const vector<int>& word_ids) {
double total_extract_time = 0;
double total_intersect_time = 0;
double total_lookup_time = 0;
- // Clear cache for every new sentence.
- trie.Reset();
+
+ MatchingsTrie trie;
shared_ptr<TrieNode> root = trie.GetRoot();
int first_x = vocabulary->GetNonterminalIndex(1);
@@ -200,8 +200,6 @@ Grammar HieroCachingRuleFactory::GetGrammar(const vector<int>& word_ids) {
}
}
- cerr << "Vocabulary size = " << vocabulary->Size() << endl;
-
Clock::time_point stop_time = Clock::now();
cerr << "Total time for rule lookup, extraction, and scoring = "
<< GetDuration(start_time, stop_time) << " seconds" << endl;