did_you_mean
did_you_mean copied to clipboard
The gem that has been saving people from typos since 2014
``` sc = DidYouMean::SpellChecker.new(dictionary: [:emailaddress3]) sc.correct('emailAddress') => [:emailaddress3] sc.correct('emailAddresseswe') => [:emailaddress3] sc.correct('emailAddress3') => [] ``` I'd expect did_you_mean to be able to suggest `emailaddress3` for `emailAddress3`
Fixed duplicates in corrections when passing method and variables with same name. Fixed #168
I've noticed https://github.com/rubygems/rubygems/issues/5234 as well. I think there are multiple improvements here: * The warning should show the caller, otherwise it's hard to know which gem is causing it (`warn...
Per PR #82, https://creativecommons.org/licenses/by-nc-sa/3.0/ states that this is not for commercial use. This should be reflected in LICENCE.txt, correct?
``` def foo end foo = 1 boo # => x.rb:6:in `': undefined local variable or method `boo' for main:Object (NameError) # Did you mean? foo # foo ```
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**: ```ruby...
A Rails app I'm working on occasionally hangs, with the process becoming unresponsive and having to be killed. We've also seen the same issue within the rails console and command-line...
I’m seeing exponential growth in time when generating `message`. Reproduction and timings here: https://gist.github.com/zenspider/4fbf1a5d237095c52184a57c86cdb5eb
I want to add suggestion on wrong number of arguments. I added experimental class with refering experimental/ivar_name_correction. ```ruby require 'did_you_mean/experimental' Dir.glob('*', 0, 1, 2) # test.rb:n:in `glob': wrong number of...
Hi, @yuki24. I'm thinking of adding global variables to suggestions. Previously: ```ruby STIN # NameError: uninitialized constant STIN # Did you mean? STDIN # Nice correction. But, this one stin...