#include "pinyin_parser2.h"
#include <ctype.h>
#include <assert.h>
+#include <stdio.h>
#include <string.h>
#include "stl_lite.h"
#include "pinyin_phrase2.h"
int maximum_len = 0; int i;
/* probe the longest possible double pinyin string. */
for (i = 0; i < len; ++i) {
- if (!IS_KEY(str[i]))
+ const char ch = str[i];
+ if (!(IS_KEY(ch) || ('0' < ch && ch <= '5')))
break;
}
maximum_len = i;
ChewingKeyVector keys = g_array_new(FALSE, FALSE, sizeof(ChewingKey));
ChewingKeyRestVector key_rests =
g_array_new(FALSE, FALSE, sizeof(ChewingKeyRest));
- pinyin_option_t options = PINYIN_CORRECT_ALL | USE_RESPLIT_TABLE;
+ pinyin_option_t options = PINYIN_CORRECT_ALL | USE_TONE | USE_RESPLIT_TABLE;
int i = 1;
while(i < argc) {