summaryrefslogtreecommitdiffstats
path: root/tests/test_chewing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_chewing.cpp')
-rw-r--r--tests/test_chewing.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 5a5701f..3243e1f 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -39,11 +39,10 @@ int main(int argc, char * argv[]){
linebuf[strlen(linebuf) - 1] = '\0';
}
- if ( strcmp ( linebuf, "quit" ) == 0)
+ if ( strcmp ( linebuf, "quit" ) == 0)
break;
- pinyin_parse_more_chewings
- (instance, linebuf);
+ size_t len = pinyin_parse_more_chewings(instance, linebuf);
pinyin_guess_sentence(instance);
char * sentence = NULL;
@@ -52,6 +51,11 @@ int main(int argc, char * argv[]){
printf("%s\n", sentence);
g_free(sentence);
+ gchar * aux_text = NULL;
+ pinyin_get_chewing_auxiliary_text(instance, len, &aux_text);
+ printf("auxiliary text:%s\n", aux_text);
+ g_free(aux_text);
+
pinyin_train(instance);
pinyin_reset(instance);
pinyin_save(context);