summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-05-25 15:16:11 +0800
committerPeng Wu <alexepico@gmail.com>2015-05-25 15:16:11 +0800
commitf82963f28c0d57574e077417d092fba4cbfead06 (patch)
tree0eaf5e40b3169596226dfa5d5bc836e8ec97446c /utils
parent6cca2a97d0660e5a51f65389fbfacc0f5cdaaf5d (diff)
downloadlibpinyin-f82963f28c0d57574e077417d092fba4cbfead06.zip
libpinyin-f82963f28c0d57574e077417d092fba4cbfead06.tar.gz
libpinyin-f82963f28c0d57574e077417d092fba4cbfead06.tar.xz
fixes a bug
Diffstat (limited to 'utils')
-rw-r--r--utils/training/gen_unigram.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/training/gen_unigram.cpp b/utils/training/gen_unigram.cpp
index bb9b6b3..fe63e36 100644
--- a/utils/training/gen_unigram.cpp
+++ b/utils/training/gen_unigram.cpp
@@ -64,7 +64,7 @@ bool generate_unigram(const pinyin_table_info_t * phrase_files) {
int result = phrase_index.get_range(i, range);
if ( result == ERROR_OK ) {
for (size_t token = range.m_range_begin;
- token <= range.m_range_end; ++token) {
+ token < range.m_range_end; ++token) {
phrase_index.add_unigram_frequency(token, freq);
}
}