pinyin_get_full_pinyin_candidates;
pinyin_choose_candidate;
pinyin_free_candidates;
- pinyin_clear_constraint;
- pinyin_clear_constraints;
pinyin_lookup_tokens;
pinyin_translate_token;
pinyin_get_pinyins_from_token;
return true;
}
-
-bool pinyin_clear_constraint(pinyin_instance_t * instance,
- size_t offset){
- pinyin_context_t * & context = instance->m_context;
-
- bool retval = context->m_pinyin_lookup->clear_constraint
- (instance->m_constraints, offset);
-
- return retval;
-}
-
-bool pinyin_clear_constraints(pinyin_instance_t * instance){
- pinyin_context_t * & context = instance->m_context;
- bool retval = true;
-
- for ( size_t i = 0; i < instance->m_constraints->len; ++i ) {
- retval = context->m_pinyin_lookup->clear_constraint
- (instance->m_constraints, i) && retval;
- }
-
- return retval;
-}
-
bool pinyin_lookup_tokens(pinyin_instance_t * instance,
const char * phrase, GArray * tokenarray){
pinyin_context_t * & context = instance->m_context;
CandidateVector candidates);
/**
- * pinyin_clear_constraint:
- * @instance: the pinyin instance.
- * @offset: the offset in the pinyin keys.
- * @returns: whether the constraint is cleared.
- *
- * Clear the previous chosen candidate.
- *
- */
-bool pinyin_clear_constraint(pinyin_instance_t * instance,
- size_t offset);
-
-/**
- * pinyin_clear_constraints:
- * @instance: the pinyin instance.
- * @returns: whether the constraints are cleared.
- *
- * Clear all constraints.
- *
- */
-bool pinyin_clear_constraints(pinyin_instance_t * instance);
-
-/**
* pinyin_lookup_tokens:
* @instance: the pinyin instance.
* @phrase: the phrase to be looked up.