summaryrefslogtreecommitdiffstats
path: root/src/pinyin.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-09-06 11:06:29 +0800
committerPeng Wu <alexepico@gmail.com>2011-09-06 11:06:29 +0800
commitdbdfd3b658f0f723513fd08415d08554d125f302 (patch)
tree5a4f779f19716f209ce79a4cf668584bfa531e0e /src/pinyin.h
parent2f401a29ab5317e5b1a7621fde958559bb355433 (diff)
downloadlibpinyin-dbdfd3b658f0f723513fd08415d08554d125f302.tar.gz
libpinyin-dbdfd3b658f0f723513fd08415d08554d125f302.tar.xz
libpinyin-dbdfd3b658f0f723513fd08415d08554d125f302.zip
update pinyin header
Diffstat (limited to 'src/pinyin.h')
-rw-r--r--src/pinyin.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/src/pinyin.h b/src/pinyin.h
index cff0663..57c2dba 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -39,11 +39,20 @@ void pinyin_fini(pinyin_context_t * context);
bool pinyin_set_options(pinyin_context_t * context,
PinyinCustomSettings * custom);
-bool pinyin_set_pinyin_keys(pinyin_context_t * context,
- PinyinKeyVector pinyin_keys);
-bool pinyin_get_guessed_sentence(pinyin_context_t * context,
- char ** sentence);
+bool pinyin_update_constraints(pinyin_context_t * context,
+ PinyinKeyVector pinyin_keys,
+ CandidateConstraints constraints);
+
+bool pinyin_get_guessed_tokens(pinyin_context_t * context,
+ PinyinKeyVector pinyin_keys,
+ CandidateConstraints constraints,
+ MatchResults match_results);
+
+bool pinyin_get_sentence(pinyin_context_t * context,
+ MatchResults match_results,
+ char ** sentence);
+
bool pinyin_parse_full(pinyin_context_t * context,
const char * onepinyin,
PinyinKey * onekey);
@@ -58,13 +67,21 @@ bool pinyin_parse_more_doubles(pinyin_context_t * context,
PinyinKeyVector pinyin_keys);
bool pinyin_get_candidates(pinyin_context_t * context,
- size_t offset, TokenVector candidates);
+ size_t offset,
+ PinyinKeyVector pinyin_keys,
+ TokenVector candidates);
+
bool pinyin_choose_candidate(pinyin_context_t * context,
- size_t offset, phrase_token_t token);
+ size_t offset,
+ PinyinKeyVector pinyin_keys,
+ CandidateConstraints constraints,
+ phrase_token_t token);
bool pinyin_clear_constraint(pinyin_context_t * context,
- size_t offset);
-bool pinyin_clear_constraints(pinyin_context_t * context);
+ size_t offset,
+ CandidateConstraints constraints);
+bool pinyin_clear_constraints(pinyin_context_t * context,
+ CandidateConstraints constraints);
bool pinyin_phrase_segment(pinyin_context_t * context,
const char * sentence,
@@ -72,7 +89,10 @@ bool pinyin_phrase_segment(pinyin_context_t * context,
bool pinyin_translate_token(pinyin_context_t * context,
phrase_token_t token, char ** word);
-bool pinyin_train(pinyin_context_t * context);
+bool pinyin_train(pinyin_context_t * context,
+ PinyinKeyVector pinyin_keys,
+ CandidateConstraints constraints,
+ MatchResults match_results);
bool pinyin_save(pinyin_context_t * context);
bool pinyin_reset(pinyin_context_t * context);