Part of #97.
A better fake track can make the lib return the whole word (prefix tech + swipe nology → lib returns technology). The current concat then double-counts (techtechnology / garbage).
In InputLogic.onUpdateTailBatchInputCompleted, before concatenating prefix + recognizedSuffix: if the recognized word starts (case-insensitive) with the current composing prefix, strip the prefix; else fall back to the existing seed-letter strip.
Lowest-risk step — do first; likely fixes some "almost worked" cases on its own.
Acceptance: golden-corpus (#21) A/B shows no regression; whole-word returns no longer double-count.
Part of #97.
A better fake track can make the lib return the whole word (prefix
tech+ swipenology→ lib returnstechnology). The current concat then double-counts (techtechnology/ garbage).In
InputLogic.onUpdateTailBatchInputCompleted, before concatenatingprefix + recognizedSuffix: if the recognized word starts (case-insensitive) with the current composing prefix, strip the prefix; else fall back to the existing seed-letter strip.Lowest-risk step — do first; likely fixes some "almost worked" cases on its own.
Acceptance: golden-corpus (#21) A/B shows no regression; whole-word returns no longer double-count.