nlp.js
nlp.js copied to clipboard
Spellcheck should support Damerau–Levenshtein distance
Is your feature request related to a problem? Please describe.
Spellchecking the word Eidt
resolves list
with distance 2, instead of edit
. This is because the check doesn't include simple transpositions.
Describe the solution you'd like
Include at least some of these spell check alternatives, specifically Damerau–Levenshtein
: https://en.wikipedia.org/wiki/Levenshtein_distance#Relationship_with_other_edit_distance_metrics
Describe alternatives you've considered
The current spell check module is new
ed in the Nlu
which means it doesn't even support replacing the spell check module with an alternative. At the very least it should also support getting the spell check from the container