diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-27 14:33:36 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-27 14:33:36 +0000 |
commit | d389d25b78e5c99366f49cdcaf788693f3c01c40 (patch) | |
tree | 03f6b880eebf2981d5ea8a9a2ec15b10eb812b97 /extractor/precomputation.cc | |
parent | 7b7167248cd605c9f5bd91b3c87e2826d2336a9f (diff) |
Unify sampling backoff strategy.
Diffstat (limited to 'extractor/precomputation.cc')
-rw-r--r-- | extractor/precomputation.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extractor/precomputation.cc b/extractor/precomputation.cc index b79daae3..3e58e2a9 100644 --- a/extractor/precomputation.cc +++ b/extractor/precomputation.cc @@ -91,7 +91,6 @@ vector<vector<int>> Precomputation::FindMostFrequentPatterns( } } - shared_ptr<DataArray> data_array = suffix_array->GetData(); // Extract the most frequent patterns. vector<vector<int>> frequent_patterns; while (frequent_patterns.size() < num_frequent_patterns && !heap.empty()) { @@ -99,7 +98,7 @@ vector<vector<int>> Precomputation::FindMostFrequentPatterns( int len = heap.top().second.second; heap.pop(); - vector<int> pattern = data_array->GetWordIds(start, len); + vector<int> pattern(data.begin() + start, data.begin() + start + len); if (find(pattern.begin(), pattern.end(), DataArray::END_OF_LINE) == pattern.end()) { frequent_patterns.push_back(pattern); |