From 7efb58accb3e2e9fea4a578350a27447cb03383c Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 15 Dec 2011 13:36:02 +0800 Subject: fixes code style --- src/storage/chewing_large_table.cpp | 3 ++- src/storage/phrase_index.cpp | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/storage') diff --git a/src/storage/chewing_large_table.cpp b/src/storage/chewing_large_table.cpp index cf527d8..93eacfe 100644 --- a/src/storage/chewing_large_table.cpp +++ b/src/storage/chewing_large_table.cpp @@ -650,7 +650,8 @@ bool ChewingLargeTable::load_text(FILE * infile) { parser.parse(options, keys, key_rests, pinyin, strlen(pinyin)); if (len != keys->len) { - fprintf(stderr, "%s\t%s\t%u\t%ld\n", pinyin, phrase, token, freq); + fprintf(stderr, "ChewingLargeTable::load_text:%s\t%s\t%u\t%ld\n", + pinyin, phrase, token, freq); continue; } diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp index 9fec159..0dc66bd 100644 --- a/src/storage/phrase_index.cpp +++ b/src/storage/phrase_index.cpp @@ -476,8 +476,12 @@ bool FacadePhraseIndex::load_text(guint8 phrase_index, FILE * infile){ parser.parse(options, keys, key_rests, pinyin, strlen(pinyin)); - if (item_ptr->get_phrase_length() == keys->len) + if (item_ptr->get_phrase_length() == keys->len) { item_ptr->append_pronunciation((ChewingKey *)keys->data, freq); + } else { + fprintf(stderr, "FacadePhraseIndex::load_text:%s\t%s\n", + pinyin, phrase); + } g_array_free(keys, TRUE); g_array_free(key_rests, TRUE); -- cgit