diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-03-10 01:01:01 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-03-10 01:01:01 +0000 |
commit | e6181c89ab8f29d8bd0fc6a3a8a359cb50c2304c (patch) | |
tree | c05eaae595c711605e6ccb596b8b634756a95c5b /extractor/fast_intersector.cc | |
parent | 65a67c6921ee6da0477531224effe38559739455 (diff) |
Added comments. Hooray!
Diffstat (limited to 'extractor/fast_intersector.cc')
-rw-r--r-- | extractor/fast_intersector.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extractor/fast_intersector.cc b/extractor/fast_intersector.cc index 1b8c32b1..2a7693b2 100644 --- a/extractor/fast_intersector.cc +++ b/extractor/fast_intersector.cc @@ -107,6 +107,7 @@ PhraseLocation FastIntersector::ExtendPrefixPhraseLocation( } else { pattern_end += phrase.GetChunkLen(phrase.Arity()) - 2; } + // Searches for the last symbol in the phrase after each prefix occurrence. for (int j = range.first; j < range.second; ++j) { if (pattern_end >= sent_end || pattern_end - positions[i] >= max_rule_span) { @@ -149,6 +150,8 @@ PhraseLocation FastIntersector::ExtendSuffixPhraseLocation( int pattern_start = positions[i] - range.first; int pattern_end = positions[i + num_subpatterns - 1] + phrase.GetChunkLen(phrase.Arity()) - 1; + // Searches for the first symbol in the phrase before each suffix + // occurrence. for (int j = range.first; j < range.second; ++j) { if (pattern_start < sent_start || pattern_end - pattern_start >= max_rule_span) { |