mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-17 11:27:39 +00:00
After digging through repo history, I couldn't find an actual reference for .editPath(), the method producing a sequence of edits represented by the edit-distance calculation. After further thought and investigation, I realized that there can be more than one possible edit sequence... and that the best approach for future stability is to calculate and return _all_ of them. The trick is to rank them based on the qualities we most look for - and for predictive-text's sliding context window, what we want is a long, unbroken sequence of 'match'-ed tokens, followed by substitutions on the edges. Previously, I'd finagled the editPath() function to check certain edit types before others, but it always felt hacky and brittle. This new approach seems like a much more robust way forward, even if it probably is a bit more costly to perform. |
||
|---|---|---|
| .. | ||
| app | ||
| engine | ||
| resources | ||
| samples | ||
| test | ||
| tools | ||
| .editorconfig | ||
| tsconfig.all.json | ||
| tsconfig.dom.json | ||