fixes phrase_index.h
[platform/upstream/libpinyin.git] / src / storage / pinyin_parser2.cpp
index a070924..131231c 100644 (file)
@@ -590,21 +590,21 @@ const resplit_table_item_t * FullPinyinParser2::retrieve_resplit_item_by_resplit
         item = resplit_table + k;
 
         const char * onepinyin = str + cur_rest->m_raw_begin;
-        size_t len = strlen(item->m_orig_keys[0]);
+        size_t len = strlen(item->m_new_keys[0]);
 
         if (cur_rest->length() != len)
             continue;
 
-        if (0 != strncmp(onepinyin, item->m_orig_keys[0], len))
+        if (0 != strncmp(onepinyin, item->m_new_keys[0], len))
             continue;
 
         onepinyin = str + next_rest->m_raw_begin;
-        len = strlen(item->m_orig_keys[1]);
+        len = strlen(item->m_new_keys[1]);
 
         if (next_rest->length() != len)
             continue;
 
-        if (0 == strncmp(onepinyin, item->m_orig_keys[1], len))
+        if (0 == strncmp(onepinyin, item->m_new_keys[1], len))
             break;
     }
 
@@ -646,6 +646,7 @@ bool DoublePinyinParser2::parse_one_key(pinyin_option_t options,
 
     ChewingTone tone = CHEWING_ZERO_TONE;
     options &= ~(PINYIN_INCOMPLETE|CHEWING_INCOMPLETE);
+    options |= PINYIN_CORRECT_UE_VE | PINYIN_CORRECT_V_U;
 
     /* parse tone */
     if (3 == len) {