pub struct WordItem {Show 13 fields
pub pinyin: SharedString,
pub canonical_pinyin: SharedString,
pub word: SharedString,
pub weight: i64,
pub source: CandidateSource,
pub scheme: SchemeType,
pub fixed_position: i32,
pub fuzzy: bool,
pub corrected_from: SharedString,
pub sentence_association: bool,
pub sentence_words: Vec<String>,
pub touch_supported: bool,
pub confident_correction: bool,
}Expand description
One candidate row. Every field the goldens record is here from the start, including the ones the overlays added.
Fields§
§pinyin: SharedStringThe code the row matched, as typed. Composition advance consumes exactly this.
canonical_pinyin: SharedStringThe complete quanpin key from the dictionary, used when a phrase is persisted.
word: SharedString§weight: i64Dictionary weight; for lattice rows trunc(log_prob * 1000), which is not a sort key.
source: CandidateSource§scheme: SchemeTypeThe scheme whose provider produced the row; in mixed wubi it routes learning and removal to the right table.
fixed_position: i320 when unfixed, otherwise the fixed slot 1..=5.
fuzzy: bool§corrected_from: SharedStringNon-empty for a row read from an autocorrected spelling; holds the folded letters the user typed.
sentence_association: boolOnly whole-sentence association rows (lattice and neural sentences).
sentence_words: Vec<String>Word boundaries of a decoded sentence, for personal context learning.
touch_supported: bool26 键双拼按触点计价的纠错整句,而且落点支持把它留在引擎给的座位上(分数不比字面整句低出 TouchTuning::show_margin):runtime 不把它当整句的次选读法挪到表尾。其余行永远为假。
confident_correction: bool26 键双拼按触点计价的纠错整句,触点支持而且明显比字面整句好,按首选规则(shuangpin::dictionary 的 confident_correction)坐了第一位。宿主据此给首选画强调色、读屏念「已纠正」(视图里的 confident_correction)。带它的行同时 touch_supported;其余行永远为假。