From 8eede65114e5442f57a5fcccdeae1c17ff352509 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 15 May 2012 15:43:01 +0100 Subject: [PATCH] bug. Unknown words given id starting from 1 --- OnDiskPt/Vocab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OnDiskPt/Vocab.cpp b/OnDiskPt/Vocab.cpp index 86072edc6..0ed9ffa2a 100644 --- a/OnDiskPt/Vocab.cpp +++ b/OnDiskPt/Vocab.cpp @@ -44,7 +44,8 @@ bool Vocab::Load(OnDiskWrapper &onDiskWrapper) // create lookup // assume contiguous vocab id m_lookup.resize(m_vocabColl.size() + 1); - + m_nextId = m_lookup.size(); + CollType::const_iterator iter; for (iter = m_vocabColl.begin(); iter != m_vocabColl.end(); ++iter) { UINT32 vocabId = iter->second;