summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
Diffstat (limited to 'gi')
-rw-r--r--gi/pyp-topics/src/train-contexts.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gi/pyp-topics/src/train-contexts.cc b/gi/pyp-topics/src/train-contexts.cc
index bf56288e..12e7baec 100644
--- a/gi/pyp-topics/src/train-contexts.cc
+++ b/gi/pyp-topics/src/train-contexts.cc
@@ -107,7 +107,8 @@ int main(int argc, char **argv)
// increment this terms frequency
pair<map<int,int>::iterator,bool> insert_result = all_terms.insert(make_pair(*docIt,1));
if (!insert_result.second)
- insert_result.first++;
+ all_terms[*docIt] = all_terms[*docIt] + 1;
+ //insert_result.first++;
}
documents_out << contexts_corpus.key(document_id) << '\t';
for (std::vector<int>::const_iterator termIt=unique_terms.begin();