ECorrect is an autocorrect module that I made in my free time. It was pretty slow but I made a few improvements to take the time from ~20s down to around ~0.5-0.6 depending on the settings.
How it works
ECorrect uses a library of 4.8 million words (no curse words). And runs a algorithm to get the closest words matching yours. I took a list of 4.8m words and wrote a python script to make it into a lua readable format. Then I used rojo to place the file inside my project as every time I would paste it my studio would crash.
Docs
local ECorrect = require(script.ECorrect)
local myWord = "Healo" -- "Hello"
ECorrect:GetWords(
player: Player, -- Don't need player if using on client
word: string, -- The word to filter
editDistance: number, -- String match distance (lower - more precise but slower)
amount: number?, -- How many words to return
delay: number?, -- How long the code will yield while searching
sort: boolean?, -- Will the words be sorted (perfered)
lowercase: boolean?, -- Will the returned words be lowercase (the list has some uppercase)
filter: boolean? -- Will the words returned be filtered (perfered)
)
Thanks for reading and using this module!
Yes, I know it’s not the best out there as it’s slow, buggy, sloppy code. But it was a small project to help me learn.