Scribe-iOS icon indicating copy to clipboard operation
Scribe-iOS copied to clipboard

Add autocorrect

Open andrewtavis opened this issue 3 years ago • 5 comments

Terms

Description

A major system keyboard feature that Scribe still lacks is autocorrect. This feature would ideally function in both the normal text proxy and the Scribe command bar so that a user could correctly type in a word to translate, conjugate or get the plural for. The data for each Scribe keyboard could likely be used as a reference for this feature.

This Stack Overflow question could be of help.

Discussions of how best to implement this feature and code contributions are more than welcome!

  • Autocomplete is another related and necessary feature and is covered in #3

andrewtavis avatar Nov 22 '21 20:11 andrewtavis

UITextChecker and its guesses attribute are potentially helpful for this. There's also a blog post on how to use it.

andrewtavis avatar Jan 19 '22 15:01 andrewtavis

This swift implementation of the popular spelling correction blog post by Peter Norvig might also be of help.

andrewtavis avatar Jan 19 '22 15:01 andrewtavis

Having autocorrect function in the command bar would be of less importance as autocomplete should help a user select a good option.

The functionality of this feature would be similar to that of annotating nouns and prepositions when they're selected (which as of now requires the Scribe key to be pressed - see this SO question for a potential solution). Selecting a word that is not in any of the noun, verb, or preposition dictionaries would trigger the three buttons to appear with optional fixes. This would require that words be annotated if there are spelling mistakes, which as of now the keyboards are doing only after being switched to.

andrewtavis avatar Jan 19 '22 17:01 andrewtavis

Allowing a user to add words to not be corrected would also be helpful when #16 is finished and settings are possible.

andrewtavis avatar Feb 13 '22 15:02 andrewtavis

Note that as mentioned in #241 we need this to account for dialects. In German German something like Buecher should be corrected to Bücher, but for Swiss German it shouldn't :)

andrewtavis avatar Jul 10 '23 20:07 andrewtavis