qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

[Feature Request] Increase autocorrect dictionary size limit

Open ohshitgorillas opened this issue 1 month ago • 5 comments

Feature Request Type

  • [ ] Core functionality
  • [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
  • [x] Alteration (enhancement/optimization) of existing feature(s)
  • [ ] New behavior

Description

Summary

Users can now algorithmically generate comprehensive autocorrect dictionaries (https://github.com/ohshitgorillas/qmk_userspace/tree/main/autocorrect/ac_generator), but the current dictionary size limit requires significant compromises to fit within memory constraints.

Problem

The autocorrect dictionary size is currently limited by the trie structure's compilation limits (63 backspace maximum, dictionary size approaching 0xFFFF bytes), however, algorithmic typo generation is capable of generating arbitrarily large correction dictionaries.

To fit within the current limit, users must:

  • Limit corrections to only the top 400-600 words
  • Be extremely conservative with adjacent key addition/replacements

This limits the ultimate effectiveness of the autocorrect feature.

Requested Change

Either:

  • Increase the maximum dictionary size, OR
  • Introduce an option/rule which allows users to opt into a larger dictionary

Use Case

Users who don't have trouble spelling, but do have fat fingers.

ohshitgorillas avatar Nov 24 '25 08:11 ohshitgorillas

Hi can I please be assigned to this

MustafaNisar2002 avatar Nov 25 '25 03:11 MustafaNisar2002

Hi can I please be assigned to this

Discuss it here, and/or make a PR. There's no assignment.

tzarc avatar Nov 25 '25 05:11 tzarc

Playing with the code with some LLM help, it looks like changing the code to support a larger library wouldn't be too difficult.
However, the dataset would not be compatible, and would need differentiation.

I have the code in a module in my repo, if you want to give it a test.

drashna avatar Nov 25 '25 07:11 drashna

Sure I will take a look @drashna thanks

MustafaNisar2002 avatar Nov 25 '25 08:11 MustafaNisar2002

Created a pull request @tzarc please review

#25838

MustafaNisar2002 avatar Nov 28 '25 19:11 MustafaNisar2002