pub struct SentenceAssociationOptions {
pub word_lattice: bool,
pub neural_keyboard: bool,
pub show_next_on_duplicate: bool,
pub collocation_model: PathBuf,
pub collocation_weight: f64,
pub collocation_rerank: bool,
pub collocation_grammar: GramConfig,
}Expand description
Neural sentence association switches. The desktop-model switch is not among them: that model runs only as the input runtime’s settled reranker, which the host gates on the preference.
Fields§
§word_lattice: bool§neural_keyboard: boolThe Engine’s own keyboard-model rerank: nine-key reranks once across its segmentations, the quanpin and shuangpin dictionaries rerank inside the lattice, and the model’s pick becomes a NeuralKeyboard row after the lattice best. Hosts leave it off: 整句联想「增强」 (the neural_keyboard preference) mounts the input runtime’s per-keystroke reranker instead (host-api keyboard_reranker_enabled). It stays for evals and experiments that build the options directly (convert_eval --keyboard-neural).
show_next_on_duplicate: bool§collocation_model: PathBufoctagram .gram 语法模型的路径(宿主按模型包解析好后传入);空 = 关闭。
路径无效时词典静默退回无搭配打分,与 msime-bigram.bin 缺失的回退一致。
collocation_weight: f64搭配项的标定系数(ln 域结果由装配方换算后按它缩放);0 = 关闭。
collocation_rerank: bool解码最优路径是否作为 Collocation 整句行显示;关掉时搭配分仍参与解码。
collocation_grammar: GramConfigoctagram 六参数;默认对齐万象现行,见 crate::lattice::octagram::GramConfig。