projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0e72e3
)
polish test chewing table
author
Peng Wu
<alexepico@gmail.com>
Wed, 21 Dec 2011 03:27:10 +0000
(11:27 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Wed, 21 Dec 2011 03:27:10 +0000
(11:27 +0800)
tests/storage/test_chewing_table.cpp
patch
|
blob
|
history
diff --git
a/tests/storage/test_chewing_table.cpp
b/tests/storage/test_chewing_table.cpp
index
396eaa8
..
ba76cf0
100644
(file)
--- a/
tests/storage/test_chewing_table.cpp
+++ b/
tests/storage/test_chewing_table.cpp
@@
-122,6
+122,19
@@
int main(int argc, char * argv[]) {
NULL, NULL, NULL);
printf("%s\t", string);
g_free(string);
+
+ ChewingKey chewing_buffer[1024];
+ size_t npron = item.get_n_pronunciation();
+ guint32 freq;
+ for (size_t m = 0; m < npron; ++m){
+ item.get_nth_pronunciation(m, chewing_buffer, freq);
+ for (size_t n = 0; n < item.get_phrase_length();
+ ++n){
+ printf("%s'",
+ chewing_buffer[n].get_pinyin_string());
+ }
+ printf("\b\t%d\t", freq);
+ }
}
printf("\n");
}