keymanapp / keymanapp/keyman

feat(web): add new specifiable model method for validating contexts for autocorrect 🚂

Open
#12,952 1 comment 0 reactions 1 assignee Claimed by @jahorton View on GitHub
epic-autocorrect feat web/ web/predictive-text/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

As noted by #12648, users will not expect autocorrect to trigger for all contexts. For example, in English, users generally don't expect autocorrect to trigger when typing numbers. That said, this can be language-dependent - there are some languages that use digits as letters in some contexts. (https://github.com/keymanapp/keyman/pull/12877#discussion_r1915816135)

To facilitate good all-around handling, #12877 implemented a default behavior similar to that of programming identifiers as a baseline for most languages. For cases like those alluded to with the linked comment, we also wish to add space for individual lexical models to include a method that overrides this behavior. The method would then return a `boolean` value indicating whether or not autocorrect is considered valid for the current token.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.