You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to work around the issue above, I decided to just prefix everything with ROOT/ and unprefix it later on, but then I found some other cases...
Script:
#!/usr/bin/env rubyrequire'set'paths=["ROOT/dir/typo","ROOT/typo",]sc=DidYouMean::TreeSpellChecker.new(dictionary: paths)puts"*** matches typo :)"putssc.correct("ROOT/tyop")puts"*** doesn't match if too distant :)"putssc.correct("ROOT/a")puts"*** matches too distant :("putssc.correct("ROOT/asduhij2ed8uuo3iekd3e/238eoiu3jkr3o48if")
Output:
*** matches typo :)
ROOT/typo
*** doesn't match if too distant :)
*** matches too distant :(
ROOT/dir/typo
I've just started playing with TreeSpellChecker and found a couple of cases where it doesn't give me the corrections I would expect.
If I run this script in ruby-3.0.3:
I get this output:
And I think in all the cases, the second path on the list (either typo or /typo) should be suggested.
What do you think? ✨✨✨
cc @yuki24
The text was updated successfully, but these errors were encountered: