summaryrefslogtreecommitdiffstats
path: root/src/pinyin.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-11-19 12:45:50 +0800
committerPeng Wu <alexepico@gmail.com>2013-11-29 15:09:14 +0800
commit94b7fe8792fc790510a5f3c5300ca349bf2bfba6 (patch)
treed26779d5c407463c5676c964280f906fca4f2422 /src/pinyin.h
parente77c6a63e3e0160215da7579bf1d0301b3ce6e12 (diff)
downloadlibpinyin-94b7fe8792fc790510a5f3c5300ca349bf2bfba6.tar.gz
libpinyin-94b7fe8792fc790510a5f3c5300ca349bf2bfba6.tar.xz
libpinyin-94b7fe8792fc790510a5f3c5300ca349bf2bfba6.zip
add methods to public api
Diffstat (limited to 'src/pinyin.h')
-rw-r--r--src/pinyin.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pinyin.h b/src/pinyin.h
index 7163435..bf3898a 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -234,6 +234,18 @@ bool pinyin_guess_sentence_with_prefix(pinyin_instance_t * instance,
const char * prefix);
/**
+ * pinyin_guess_predicted_candidates:
+ * @instance: the pinyin instance.
+ * @prefix: the prefix before the predicted candidates.
+ * @returns: whether the predicted candidates are guessed successfully.
+ *
+ * Guess the predicted candidates after the prefix word.
+ *
+ */
+bool pinyin_guess_predicted_candidates(pinyin_instance_t * instance,
+ const char * prefix);
+
+/**
* pinyin_phrase_segment:
* @instance: the pinyin instance.
* @sentence: the utf-8 sentence to be segmented.
@@ -388,6 +400,18 @@ int pinyin_choose_candidate(pinyin_instance_t * instance,
lookup_candidate_t * candidate);
/**
+ * pinyin_choose_predicted_candidate:
+ * @instance: the pinyin instance.
+ * @candidate: the selected candidate.
+ * @returns: whether the self-learning is successful.
+ *
+ * Choose a predicted candidate.
+ *
+ */
+bool pinyin_choose_predicted_candidate(pinyin_instance_t * instance,
+ lookup_candidate_t * candidate);
+
+/**
* pinyin_clear_constraint:
* @instance: the pinyin instance.
* @offset: the offset in the pinyin keys.