Commit graph

247 commits

Author SHA1 Message Date
Joshua Horton
1b74434170 Merge branch 'feat/web/punctuation-whitespace-reversion' into feat/web/auto-accept-on-punctuation 2025-09-05 09:39:26 -05:00
Joshua Horton
7c86659723 Merge branch 'epic/autocorrect' into feat/web/punctuation-whitespace-reversion 2025-09-05 09:38:54 -05:00
Joshua Horton
24db7bd417 fix(web): predict with most recent transition upon receiving empty input 2025-09-04 15:34:37 -05:00
Joshua Horton
7a4f55ac72 Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect
In particular, this merges in the recent changes
to `master` from #14618 that adjust the
edit-distance calculation class and simplify its
input format.

These changes intersected with some epic/autocorrect
code added by #14617 and #14462, which needed tweaks
to work correctly with the new format.
2025-09-03 12:37:49 -05:00
Joshua Horton
770a87860a Merge branch 'feat/web/punctuation-whitespace-reversion' into feat/web/auto-accept-on-punctuation 2025-09-03 12:21:33 -05:00
Joshua Horton
eafd32a222 Merge branch 'epic/autocorrect' into feat/web/punctuation-whitespace-reversion 2025-09-03 12:20:57 -05:00
Joshua Horton
04b11dc279
Merge pull request #14673 from keymanapp/fix/web/apply-suggestion-after-multi-whitespace
fix(web): fix suggestion-application when preserved text prepends extra whitespace 🚂
2025-09-04 00:00:43 +07:00
Joshua Horton
6947b3057f
Merge pull request #14670 from keymanapp/fix/web/fat-finger-index-0
fix(web): always place true input at lead of fat-finger distribution 🚂
2025-09-04 00:00:29 +07:00
Joshua Horton
3af5eb604c
Merge pull request #14640 from keymanapp/fix/web/wordbreak-shift-at-head
fix(web): improve context transition handling when wordbreaking shifts at sliding-context start 🚂
2025-09-04 00:00:12 +07:00
Joshua Horton
65dc3733a4
Merge pull request #14617 from keymanapp/feat/web/edit-path-ranking
feat(web): determine all equal-cost edit-paths & rank them by quality 🚂
2025-09-04 00:00:02 +07:00
Joshua Horton
80617bfcad
Merge pull request #14615 from keymanapp/feat/web/visualize-distance-calculation
feat(web): add method that provides visualization for edit-distance calculations 🚂
2025-09-03 23:59:51 +07:00
Joshua Horton
2ec76c70ba
Merge pull request #14575 from keymanapp/change/web/map-transform-tokenization
change(web): map tokenized transform by index relative to context tail 🚂
2025-09-03 23:59:43 +07:00
Joshua Horton
1a1fd79813
Merge pull request #14573 from keymanapp/refactor/web/independent-compute-alignment
refactor(web): move computeAlignment core to standalone method 🚂
2025-09-03 23:59:33 +07:00
Joshua Horton
581e861285
Merge pull request #14476 from keymanapp/fix/web/sliding-tokenization-alignment
fix(web): prevent preserved leading-token text from breaking alignment 🚂
2025-09-03 23:59:22 +07:00
Joshua Horton
2b317689f1
Merge pull request #14558 from keymanapp/fix/web/post-bksp-applies
fix(web): handle suggestion application after backspacing 🚂
2025-09-03 23:59:00 +07:00
Joshua Horton
8d51fbb7f2
Merge pull request #14470 from keymanapp/change/web/cache-states-selectively
change(web): do not cache context states that will no longer be referenced 🚂
2025-09-03 23:58:52 +07:00
Joshua Horton
29fc43e423
Merge pull request #14471 from keymanapp/refactor/web/analyze-state-transition
refactor(web): move attemptMatchContext to ContextState.analyzeTransition 🚂
2025-09-03 23:58:44 +07:00
Joshua Horton
a636b5bb7a Merge branch 'epic/autocorrect' into refactor/web/tokenization-transition 2025-09-03 10:40:56 -05:00
Joshua Horton
78cdfe4cd1
Merge pull request #14443 from keymanapp/change/web/suggestion-tracking
change(web): rework applied-suggestion tracking + reversions 🚂
2025-09-03 22:38:56 +07:00
Joshua Horton
a28fde81b7
Merge pull request #14442 from keymanapp/change/web/cache-context-transitions
change(web): cache context transition objects, not just context state 🚂
2025-09-03 22:38:47 +07:00
Joshua Horton
191db9cba9
Merge pull request #14618 from keymanapp/refactor/web/simplify-calculation-inputs
refactor(web): simplify edit-distance calculation-object inputs
2025-09-03 22:11:00 +07:00
Joshua Horton
770ac2a13f
Merge pull request #14592 from keymanapp/feat/web/search-subset-batching
feat(web): batch correction-search paths by related subsets
2025-09-03 22:10:46 +07:00
Joshua Horton
7b7854a3c4 fix(web): fix suggestion-application when preserved text prepends extra whitespace 2025-09-02 13:27:29 -05:00
Joshua Horton
d5f08330fb Merge branch 'fix/web/wordbreak-shift-at-head' into fix/web/fat-finger-index-0 2025-09-02 10:32:12 -05:00
Joshua Horton
40ffbf2cd8 Merge branch 'feat/web/edit-path-ranking' into fix/web/wordbreak-shift-at-head 2025-09-02 10:31:26 -05:00
Joshua Horton
ccf51a6b47 Merge branch 'feat/web/visualize-distance-calculation' into feat/web/edit-path-ranking 2025-09-02 10:30:07 -05:00
Joshua Horton
8cf438c8bc Merge branch 'change/web/map-transform-tokenization' into feat/web/visualize-distance-calculation 2025-09-02 10:29:41 -05:00
Joshua Horton
79b063d39d fix(web): always place true input at lead of fat-finger distribution
This removes a few places where the distribution was sorted, as there are cases where a different key can have higher probability than the one actually tapped.
2025-09-02 10:07:18 -05:00
Joshua Horton
41de8888ce fix(web): improve context transition handling when wordbreaking shifts at sliding-context start 2025-09-02 08:55:45 -05:00
Joshua Horton
1f3d270846
change(web): apply code-styling suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-28 21:38:59 +07:00
Joshua Horton
33ae31f3a4 fix(web): prevent undefined traversal entry 2025-08-28 09:32:48 -05:00
Joshua Horton
2c42308c84 change(web): address PR comments 2025-08-28 09:23:57 -05:00
Joshua Horton
1942309356 feat(web): add unit test for empty-char inputs, matches 2025-08-28 09:15:47 -05:00
Joshua Horton
d9aebf0213 Merge branch 'feat/web/search-subset-batching' into refactor/web/simplify-calculation-inputs 2025-08-28 09:10:11 -05:00
Joshua Horton
820c082839
docs(web): Apply comment-oriented suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-28 21:03:52 +07:00
Joshua Horton
9f54ab1b25
change(web): add missing semi-colon
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-28 20:57:39 +07:00
Keyman Server
fc4e3d007c
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect 2025-08-28 01:33:18 -07:00
Joshua Horton
82c35d0b97 refactor(web): simplify calculation-object inputs 2025-08-27 16:40:45 -05:00
Joshua Horton
a08390750f refactor(web): track traversal history on search node, not calculation object 2025-08-27 16:08:27 -05:00
Joshua Horton
ae404501a8 Merge branch 'feat/web/visualize-distance-calculation' into feat/web/edit-path-ranking 2025-08-27 15:27:42 -05:00
Joshua Horton
62e664369f Merge branch 'change/web/map-transform-tokenization' into feat/web/visualize-distance-calculation 2025-08-27 15:27:14 -05:00
Joshua Horton
4e8b7c8ad4 Merge branch 'refactor/web/independent-compute-alignment' into change/web/map-transform-tokenization 2025-08-27 15:26:45 -05:00
Joshua Horton
8b3b0affd4 Merge branch 'fix/web/sliding-tokenization-alignment' into refactor/web/independent-compute-alignment 2025-08-27 15:26:02 -05:00
Joshua Horton
aa1fff193c fix(web): handle backward context-slides (as from backspaces) 2025-08-27 15:25:00 -05:00
Joshua Horton
e5a816d7bc feat(web): determine all equal-cost edit-paths & rank them by quality
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.
2025-08-27 15:06:42 -05:00
Joshua Horton
50d9c1fb0f Merge branch 'refactor/web/independent-compute-alignment' into change/web/map-transform-tokenization 2025-08-27 15:04:54 -05:00
Joshua Horton
fae2dec1fe Merge branch 'fix/web/sliding-tokenization-alignment' into refactor/web/independent-compute-alignment 2025-08-27 15:04:29 -05:00
Joshua Horton
9ef70559a4 feat(web): add method that provides visualization for edit-distance calculations
The new method is implemented separately from the `ClassicalDistanceCalculation` class in order to facilitate tree-shaking.  It can easily be imported for local builds or referenced in a temporary class property as needed.
2025-08-27 15:03:33 -05:00
Joshua Horton
045ad30094 docs(web): Fix comment in alignment-helpers.ts
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2025-08-27 15:03:33 -05:00
Joshua Horton
0937d0da4c Merge branch 'fix/web/post-bksp-applies' into fix/web/sliding-tokenization-alignment 2025-08-26 08:54:45 -05:00