Skip to content

Adjusting deletion costs conditioned on adjacent letters #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TimoLaaan opened this issue Apr 8, 2025 · 1 comment
Open

Adjusting deletion costs conditioned on adjacent letters #36

TimoLaaan opened this issue Apr 8, 2025 · 1 comment

Comments

@TimoLaaan
Copy link

Thank you for this great package! It works really well and it helps my Master Thesis about spelling mistakes. I now adjusted the costs for letter substitutions based on what keys are adjacent to each other on the keyboard.

Now imagine this example: Someone writes 'Horsde' instead of 'Horse'. In that case, I would like the deletion cost of 'd' to be 0.5 instead of 1, because the 'd' key is adjacent to one of the keys of the adjacent letters in the word (in this case both the 's' and the 'e'). If the spelling error would be 'Horsbe' instead of 'Horse', I'd want an edit distance of 1 instead.

Is that possible to do in any way? As far as I see it is only possible to make general statements concerning deletion costs and not those conditional ones that are necessary here.

Best,
Timo

@SuzanaK
Copy link

SuzanaK commented Apr 30, 2025

It's the same with language specific edits, e.g. in German the h after t is often omitted, so the insertion cost for h should be lower but only after certain letters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants