From e75ebb84de721b1d0a29c81ea8192aa787ea9284 Mon Sep 17 00:00:00 2001 From: "philblunsom@gmail.com" Date: Fri, 2 Jul 2010 15:29:49 +0000 Subject: git-svn-id: https://ws10smt.googlecode.com/svn/trunk@113 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pyp-topics/src/train-contexts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gi') 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::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::const_iterator termIt=unique_terms.begin(); -- cgit v1.2.3