Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(web): track the base correction for generated predictions 📚 #11875

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

jahorton
Copy link
Contributor

This PR serves to facilitate autocorrect.

After some brainstorming and design work, I've determined that a suggestion's underlying correction will be an important factor in deciding whether or not to enable the suggestion for automatic application. While it is possible to recompute some of the properties after the fact, the logic will be much more straightforward if we properly track each prediction's underlying correction from the outset.

While making the change, I remembered a comment from one of my recent PRs: #11424 (comment)

Where else would this type be used?

(In regard to lexical-p, correction-p, etc)

We're able to more cleanly compute these values now. Additionally... we don't really need to emit them during standard use, though they are useful sometimes when debugging... so I added a flag that can be used to turn them off. Allowing this to be toggled by Keyman Engine for Web would require additional work, but it's at least a start. (I don't think they'll actually be needed outside of the worker, even with active autocorrect.)

@keymanapp-test-bot skip

@jahorton jahorton requested a review from mcdurdin as a code owner June 26, 2024 08:18
@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S5 milestone Jun 26, 2024
@jahorton jahorton changed the title change(web): track the base correction when generating predictions 📚 change(web): track the base correction for generated predictions 📚 Jun 26, 2024
The dummy model never set a prediction's probability on the suggestion, so it never emitted p, lexical-p, or correction-p values before this branch's changes.
@jahorton jahorton requested a review from ermshiperete as a code owner June 27, 2024 02:49
@github-actions github-actions bot added web/ and removed web/ labels Jun 27, 2024
@github-actions github-actions bot added web/ and removed web/ labels Jun 27, 2024
@darcywong00 darcywong00 modified the milestones: A18S5, A18S6 Jul 5, 2024
Base automatically changed from change/common/models/templates/trie-results-through-traversal to master July 8, 2024 07:37
@jahorton jahorton merged commit 847077b into master Jul 8, 2024
19 checks passed
@jahorton jahorton deleted the change/web/track-prediction-base-corrections branch July 8, 2024 07:37
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.70-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants