Commit graph

32933 commits

Author SHA1 Message Date
Joshua Horton
5d294df1bf Merge branch 'refactor/web/use-interface-as-search-parent' into refactor/web/differentiate-module-types 2026-01-22 09:35:00 -06:00
Joshua Horton
42fcbc390d refactor(web): move unit-testing .hasInputs to standalone, tree-shakable method 2026-01-22 09:21:05 -06:00
Joshua Horton
64791e1277 fix(web): adjust formatting nit re: missing else 2026-01-22 08:40:41 -06:00
Joshua Horton
4807e35df8 docs(web): fix outdated doc-comments, typos per review 2026-01-16 08:42:00 -06:00
Joshua Horton
dc383f873d Merge branch 'refactor/web/use-interface-as-search-parent' into refactor/web/differentiate-module-types 2026-01-14 16:50:34 -06:00
Joshua Horton
cf70816b97 change(web): update unit-test suite name 2026-01-14 16:50:13 -06:00
Joshua Horton
a281711ebf refactor(web): create separate types for search graph root notes 2026-01-14 15:21:32 -06:00
Joshua Horton
5a17050bff change(web): improve nil-input case handling 2026-01-09 14:50:25 -06:00
Joshua Horton
348e876907 refactor(web): differentiate search-space module types
This PR converts SearchQuotientSpur into an abstract base class with specialized forms for different cases.  Two implementations are provided:
- SearchQuotientRoot - for the root node of the search
- LegacyQuotientSpur - for modeling existing behavior before swapping to our target design and model

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:32:45 -06:00
Joshua Horton
3a56e23753 refactor(web): generalize SearchQuotientSpur parent requirements
As an upcoming goal is to introduce a new SearchQuotientNode type that will assist with context-caching across multiple tokenizaitons, it is wise to generalize SearchQuotientSpur and functions utilizing it to accept any SearchQuotientNode-implementing type as its parent.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:31:08 -06:00
Joshua Horton
445cca21c4 refactor(web): refactor local input cost heuristic
These changes were previously part of #14987 and have been extracted for ease of review.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:23:12 -06:00
Joshua Horton
72ee0fe576 refactor(web): make SearchResult's node-path accessible
This was formerly part of #14987 and has been extracted for ease of review.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:18:28 -06:00
Joshua Horton
f16542fce2 refactor(web): replace SearchQuotientSpur.addInput() with extended constructor
This has been factorized out of #14987 for ease of review.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:17:57 -06:00
Joshua Horton
2a04d35f1f fix(web): deletions should have flat cost
That is, corrections that eliminate user keystrokes from consideration should have a flat cost regardless of the keystroke's original transform distribution.  Neither deleteLeft nor insert effects should have any impact.

Fixes: #15325

Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:12:46 -06:00
Joshua Horton
bfad3ef074 fix(web): prevent insert-delete edit sequences from aliasing as substitution edits
Build-bot: skip build:web
Test-bot: skip
2026-01-09 11:03:42 -06:00
Joshua Horton
4f98dbff7f change(web): avoid main-code internal-hash imports 2026-01-09 10:59:38 -06:00
Joshua Horton
cf862439d5 change(web): track SearchNode last edit-edge type 2026-01-09 10:59:38 -06:00
Joshua Horton
8a165d24b4 change(web): remove duplicate correction-search path filtering
Upon investigation into the code being removed, this mostly triggered whenever an empty transform appeared in the input - during a context reset, at initialization, or when a deadkey is typed.  (Deadkeys aren't sent to the pred-text engine.)  This is generally not a common case within the engine, and there exists other filtering that helps prevent duplicating search results.

Suppose a token that begins tagged with an empty transform.  When the search performs an 'insertion' to better lookup words down a lexical path, the 'insertion' is identical whether before or after an empty transform.  Similarly, insertions after a deletion appear no different than substitutions (or the same insertion before the deletion, then the deletion itself).

The code likely didn't gain us much, as it likely carried some performance overhead - it built a large object that required memory and lookup time that involved constructing and processing strings for hashing.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 10:59:38 -06:00
Joshua Horton
db77619672 docs(web): fix SearchNode.setupSubsetProcessing param doc comments 2026-01-09 10:57:29 -06:00
Joshua Horton
32de0293c5 fix(web): post-rebase patchup 2026-01-09 10:57:27 -06:00
Joshua Horton
92d84b1b91 change(web): use search-space ID to find matching tokenization, preservation transform 2026-01-09 10:56:33 -06:00
Joshua Horton
fa828d4710 feat(web): add correction source search-space identification
When we start supporting more than one "space" for correction-searches, we may need to know which "space" (tokenization) a suggestion arose from.  This way, we have a path forward for applying tokenization-dependent behaviors that may be required.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 10:55:47 -06:00
Joshua Horton
ce3f90dd81 change(web): do not export SPACE_ID_SEED 2026-01-09 10:54:58 -06:00
Joshua Horton
af61a56db9 docs(web): fix doc-comment word omisson per review 2026-01-09 10:54:58 -06:00
Joshua Horton
d0469ff3f0 refactor(web): adds SearchQuotientNode interface
This new interface is being added in preparation for efficient multi-tokenization correction-search.  SearchQuotientSpur has been modified to implement it, and a new type (SearchQuotientNodeImpl) will be added in the near future as an additional implementing type.

Build-bot: skip build:web
Test-bot: skip
2026-01-09 10:54:55 -06:00
Joshua Horton
340406cdfc change(web): rename .searchSpace property to .searchModule
Build-bot: skip build:web
Test-bot: skip
2026-01-09 10:24:29 -06:00
Joshua Horton
4b201870e9 refactor(web): implement simple search-quotient-spur reuse
This changes SearchQuotientSpur to construct new instances whenever the path is extended, treating SearchQuotientSpur as an immutable portion of the search graph that may be extended by new input, creating new instances of SearchQuotientSpur.

This, in turn, removes the need to clone SearchQuotientSpur instances when new input is received for an incoming token; the original instance's represention will remain unchanged and may also be reused by a new instance extending the graph for the newly-received input.

Relates-to: #14445

Build-bot: skip build:web
Test-bot: skip
2026-01-09 10:06:56 -06:00
Joshua Horton
eba03c3ea2 Merge branch 'docs/web/add-search-space-doc' into refactor/web/relocate-search-space 2026-01-09 09:57:55 -06:00
Joshua Horton
1bbbd6f79c docs(web): fix typo 2026-01-09 09:54:51 -06:00
Joshua Horton
ac68b5de92 docs(web): remove excess TODO 2026-01-09 09:37:53 -06:00
Joshua Horton
d493f607c2 docs(web): address review comments 2026-01-09 09:36:50 -06:00
Joshua Horton
be59706d37 docs(web): update graph-doc names for upcoming classes 2026-01-09 09:17:12 -06:00
Joshua Horton
dc1cd3b792 docs(web): fix graph title 2026-01-09 09:03:24 -06:00
Joshua Horton
ca96212ab3 docs(web): enhance left-deletion doc comment 2026-01-09 09:03:24 -06:00
Joshua Horton
8b3356bfb4 docs(web): completes first draft of the alternate approach for correction-search documentation 2026-01-09 09:03:24 -06:00
Joshua Horton
7edf022dee docs(web): adds 'insert', 'delete' quotient graphs 2026-01-09 09:03:24 -06:00
Joshua Horton
e119fe5004 docs(web): adds initial quotient-graph visualizations 2026-01-09 09:03:24 -06:00
Joshua Horton
585e89196f docs(web): add doc updates 2026-01-09 09:03:24 -06:00
Joshua Horton
f3789bbb3a docs(web): start alternate doc using different explanation strategy 2026-01-09 09:03:24 -06:00
Joshua Horton
0c8851f058 docs(web): tweak getBestMatches.tests.ts header comment 2026-01-07 10:12:48 -06:00
Joshua Horton
4d6130e6e2 fix(web): set proper name for test suite 2026-01-05 15:24:00 -06:00
Joshua Horton
65c8c86cd1 change(web): rename test suite for primary correction-space search method testing 2026-01-05 13:36:35 -06:00
Joshua Horton
c02de14e03 Merge branch 'refactor/web/correction-heuristic-and-thresholding' into refactor/web/relocate-search-space 2026-01-05 13:04:32 -06:00
Joshua Horton
574caebea7 change(web): fix comment typo, simplify constructor section 2026-01-05 13:02:40 -06:00
Joshua Horton
4940caa20f change(web): rename SearchPath as SearchQuotientSpur 2026-01-05 12:32:49 -06:00
Joshua Horton
f61cdfb1de change(web): address MD PR review concerns 2025-11-13 08:47:18 -06:00
Joshua Horton
b1811d9a11 Merge branch 'refactor/web/correction-heuristic-and-thresholding' into refactor/web/relocate-search-space 2025-11-10 11:44:30 -06:00
Joshua Horton
4434c22edd Merge branch 'epic/autocorrect' into refactor/web/correction-heuristic-and-thresholding 2025-11-10 11:44:02 -06:00
Joshua Horton
a03601eb71 change(web): do not relocate PathResult type definitions 2025-11-10 11:40:33 -06:00
Joshua Horton
54c76c9271 change(web): rename SearchSpace to SearchPath
SearchSpace itself will become an _interface_ implemented by what is now SearchPath, and another type also implementing it will be introduced in an upcoming PR.
2025-10-20 09:25:38 -05:00