2 ms·
you're not gonna like the perf of doing this for all variations. it will be far faster to put together a regex with all variations and do a single pass. of cou
by leeoniya 4y ago
you're not gonna like the perf of doing this for all variations. it will be far faster to put together a regex with all variations and do a single pass.
of course if you have specific known/common mistakes, it could be useful to only consider those. for example, spelling errors are less common at the start of words. and keyboard letter proximity limits which mistakes are likely.
- magicalhippo 4y ago> for example, spelling errors are less common at the start of words At least on mobile, I find I make just as many first letter mistakes by hitting the wrong "key" on the on-screen keyboard, as I do in any other position of the word. Very annoyingly the predictive text engine assumes like you mention and it takes a lot for it to consider the first letter being wrong.