fix(input,core): fix live punctuation typo triggers, expected insert cleanup, and ngram scan

This commit is contained in:
Yun Chan 2026-11-14 15:14:53 +09:00
parent a37dd63909
commit 2a009e421a
8 changed files with 640 additions and 53 deletions

View file

@ -169,8 +169,7 @@ export class PersonalNgramModel {
const extends_ = (word: string) => word.length > partial.length && word.startsWith(partial)
first = context.length > 0 ? this._next(context, extends_, passes) : null
if (!first) {
const unigram = new Map([...this._unigram].filter(([word]) => extends_(word)))
const pick = best(unigram, () => true)
const pick = best(this._unigram, extends_)
first = passes(pick) ? pick : null
}
joint = 'attach'