fix(input,core): fix live punctuation typo triggers, expected insert cleanup, and ngram scan
This commit is contained in:
parent
a37dd63909
commit
2a009e421a
8 changed files with 640 additions and 53 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue