cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.74k stars 82 forks source link

Support spell checking for text fields #711

Open kkoreilly opened 10 months ago

kkoreilly commented 10 months ago

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 commented 9 months ago

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 commented 8 months ago

Did not mean to close.

rcoreilly commented 6 months ago

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

kkoreilly commented 4 months ago

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.