summaryrefslogtreecommitdiff
path: root/extractor/matchings_sampler.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-11-28 01:39:14 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-11-28 01:49:10 +0000
commit9e742b90007c32e9f0cec8940c73bd50e33b8182 (patch)
tree4deb3815a4f47bfc8bebf0279622a37515632dee /extractor/matchings_sampler.cc
parentd389d25b78e5c99366f49cdcaf788693f3c01c40 (diff)
Fixes.
Diffstat (limited to 'extractor/matchings_sampler.cc')
-rw-r--r--extractor/matchings_sampler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/extractor/matchings_sampler.cc b/extractor/matchings_sampler.cc
index bb916e49..75a62366 100644
--- a/extractor/matchings_sampler.cc
+++ b/extractor/matchings_sampler.cc
@@ -30,8 +30,9 @@ int MatchingsSampler::GetPosition(const PhraseLocation& location,
void MatchingsSampler::AppendMatching(vector<int>& samples, int index,
const PhraseLocation& location) const {
- copy(location.matchings->begin() + index,
- location.matchings->begin() + index + location.num_subpatterns,
+ int start = index * location.num_subpatterns;
+ copy(location.matchings->begin() + start,
+ location.matchings->begin() + start + location.num_subpatterns,
back_inserter(samples));
}