diff options
-rw-r--r-- | src/storage/chewing_large_table.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/storage/chewing_large_table.cpp b/src/storage/chewing_large_table.cpp index d1b0d91..bddd1c5 100644 --- a/src/storage/chewing_large_table.cpp +++ b/src/storage/chewing_large_table.cpp @@ -432,6 +432,7 @@ int ChewingArrayIndexLevel<phrase_length>::convert if (null_token == cursor.m_range_begin) { cursor.m_range_begin = token; cursor.m_range_end = token + 1; + cursor_head = head; } else if (cursor.m_range_end == token && PHRASE_INDEX_LIBRARY_INDEX(cursor.m_range_begin) == PHRASE_INDEX_LIBRARY_INDEX(token)) { @@ -647,6 +648,11 @@ bool ChewingLargeTable::load_text(FILE * infile) { pinyin_option_t options = USE_TONE; parser.parse(options, keys, key_rests, pinyin, strlen(pinyin)); + if (0 == keys->len) { + fprintf(stderr, "%s\t%s\t%u\t%ld\n", pinyin, phrase, token, freq); + continue; + } + add_index(keys->len, (ChewingKey *)keys->data, token); g_array_free(keys, TRUE); |