core icon indicating copy to clipboard operation
core copied to clipboard

Consider implementing global spell checking

Open kkoreilly opened this issue 1 year ago • 3 comments

We currently have all of the logic for spell checking implemented, but it is only being used in text editors. I think that we should add this functionality to text fields as well.

kkoreilly avatar Dec 26 '23 17:12 kkoreilly

The spelling data used for the text editor spell checking is 14.7 megabytes, which is most of the size of the text editor; without the spelling data, text editor is only 8 megabytes. Therefore, we need to make spelling data a separate download, and thus we probably don't want spell checking built into gi.

kkoreilly avatar Feb 07 '24 18:02 kkoreilly

Did not mean to close.

kkoreilly avatar Feb 12 '24 06:02 kkoreilly

The current spell file is large because it stores the corrections in the file -- would be better to just store the words and build the corrections upon loading, as a background process. https://github.com/sajari/fuzzy is the original impl, and here is some relevant discussion: https://stackoverflow.com/questions/2294915/what-algorithm-gives-suggestions-in-a-spell-checker https://wolfgarbe.medium.com/1000x-faster-spelling-correction-algorithm-2012-8701fcd87a5f

rcoreilly avatar Apr 16 '24 18:04 rcoreilly

Much more efficient storing of the spelling file was implemented in #1001, which reduced binary sizes by 14.0 MB. Supporting spell checking for text fields is not a high priority, so I will mark this as low priority for now.

kkoreilly avatar Jul 05 '24 17:07 kkoreilly