Skip to content

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Nov 4, 2025

🚧

This addition will allow us to clearly and cleanly indicate transforms that are two (or more) halves of the same original whole. It is notably more selective than just the original transition ID and is better suited for indicating split-transform cases.

Build-bot: skip build:web
Test-bot: skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Nov 4, 2025

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot changed the title refactor(web): adds unique identifier to transform-tokenization subsets refactor(web): adds unique identifier to transform-tokenization subsets 🚂 Nov 4, 2025
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S15 milestone Nov 4, 2025
Comment on lines 173 to 174
// check... this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// check... this.

Oops.

@jahorton jahorton force-pushed the refactor/web/transform-tokenization-subset-ids branch 2 times, most recently from d13ebc8 to 1d113f5 Compare November 5, 2025 16:32
@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
This changes SearchPath to construct new instances whenever the path is extended, treating SearchPath as an immutable portion of the search graph that may be referenced by path extensions - new instances of SearchPath.

This, in turn, removes the need to clone SearchPath instances when new input is received for an incoming token; the original path'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
This new interface is being added in preparation for efficient multi-tokenization correction-search.  SearchPath has been modified to implement it, and a new type (SearchCluster) will be added in the near future as an additional implementing type.

Build-bot: skip build:web
Test-bot: skip
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
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
As an upcoming goal is to introduce a new SearchSpace type that will assist with context-caching across multiple tokenizaitons, it is wise to generalize SearchPath and functions utilizing it to accept any SearchSpace-implementing type as its parent.

Build-bot: skip build:web
Test-bot: skip
…le spaces

Build-bot: skip build:web
Test-bot: skip
Once we start considering alternate tokenization schemes, we'll want to note how each potential input path aligns with the original input keystrokes.  As there can be multiple paths to land within the same token, it's best to store this data on the SearchPath objects instead.  This becomes especially relevant when considering token splits and merges, which will be the next follow-ups.

Build-bot: skip build:web
Test-bot: skip
…SearchSpace

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from ca906dd to 316abe3 Compare November 10, 2025 20:51
@jahorton jahorton force-pushed the refactor/web/transform-tokenization-subset-ids branch from 1d113f5 to e97c968 Compare November 10, 2025 21:02
@jahorton jahorton changed the base branch from refactor/web/complex-search-space-reuse to refactor/web/relocate-source-range-key November 10, 2025 21:03
This addition will allow us to clearly and cleanly indicate transforms that are two (or more) halves of the same original whole.  It is notably more selective than just the original transition ID and is better suited for indicating split-transform cases.

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/transform-tokenization-subset-ids branch from e97c968 to 0792377 Compare November 11, 2025 21:41
@keyman-server keyman-server modified the milestones: A19S16, A19S17 Nov 22, 2025
@keyman-server keyman-server modified the milestones: A19S17, A19S18 Dec 6, 2025
@keyman-server keyman-server modified the milestones: A19S18, A19S19 Dec 21, 2025
@keyman-server keyman-server modified the milestones: A19S19, A19S20 Jan 3, 2026
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 7831a6d to 346f737 Compare January 9, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants