diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-05-23 20:42:26 +0100 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-05-23 20:42:26 +0100 |
commit | 4ab38fecf0f49c5132a5d5ea748d03e0acfa36c2 (patch) | |
tree | 8e250d99f4a381eae865a15b6eb43b0f77b68479 /extractor/rule_extractor.cc | |
parent | 35d2c095ba6a912272f2fcc8322ece4213ada82b (diff) | |
parent | 1d96c9c9c521edfca1d10e4d8c5064f79fda3ec5 (diff) |
Merge branch 'master' of github.com:pauldb89/cdec
Diffstat (limited to 'extractor/rule_extractor.cc')
-rw-r--r-- | extractor/rule_extractor.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extractor/rule_extractor.cc b/extractor/rule_extractor.cc index fa7386a4..d9181175 100644 --- a/extractor/rule_extractor.cc +++ b/extractor/rule_extractor.cc @@ -81,7 +81,7 @@ vector<Rule> RuleExtractor::ExtractRules(const Phrase& phrase, // Calculate statistics for the (sampled) occurrences of the source phrase. map<Phrase, double> source_phrase_counter; - map<Phrase, map<Phrase, map<PhraseAlignment, int> > > alignments_counter; + map<Phrase, map<Phrase, map<PhraseAlignment, int>>> alignments_counter; for (auto i = matchings.begin(); i != matchings.end(); i += num_subpatterns) { vector<int> matching(i, i + num_subpatterns); vector<Extract> extracts = ExtractAlignments(phrase, matching); @@ -165,7 +165,7 @@ vector<Extract> RuleExtractor::ExtractAlignments( // Get spans for nonterminal gaps. bool met_constraints = true; int num_symbols = phrase.GetNumSymbols(); - vector<pair<int, int> > source_gaps, target_gaps; + vector<pair<int, int>> source_gaps, target_gaps; if (!helper->GetGaps(source_gaps, target_gaps, matching, chunklen, source_low, source_high, target_low, target_high, source_phrase_low, source_phrase_high, source_back_low, source_back_high, @@ -210,7 +210,7 @@ vector<Extract> RuleExtractor::ExtractAlignments( void RuleExtractor::AddExtracts( vector<Extract>& extracts, const Phrase& source_phrase, const unordered_map<int, int>& source_indexes, - const vector<pair<int, int> >& target_gaps, const vector<int>& target_low, + const vector<pair<int, int>>& target_gaps, const vector<int>& target_low, int target_phrase_low, int target_phrase_high, int sentence_id) const { auto target_phrases = target_phrase_extractor->ExtractPhrases( target_gaps, target_low, target_phrase_low, target_phrase_high, @@ -232,7 +232,7 @@ void RuleExtractor::AddNonterminalExtremities( const vector<int>& chunklen, const Phrase& source_phrase, int source_back_low, int source_back_high, const vector<int>& source_low, const vector<int>& source_high, const vector<int>& target_low, - const vector<int>& target_high, vector<pair<int, int> > target_gaps, + const vector<int>& target_high, vector<pair<int, int>> target_gaps, int sentence_id, int source_sent_start, int starts_with_x, int ends_with_x, int extend_left, int extend_right) const { int source_x_low = source_back_low, source_x_high = source_back_high; |