Skip to content
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

Distance works but not similarity #57

Open
shideneyu opened this issue Jun 4, 2024 · 1 comment
Open

Distance works but not similarity #57

shideneyu opened this issue Jun 4, 2024 · 1 comment

Comments

@shideneyu
Copy link

~ gem install jaro_winkler

irbBuilding native extensions. This could take a while...
Successfully installed jaro_winkler-1.5.6
Parsing documentation for jaro_winkler-1.5.6
Done installing documentation for jaro_winkler after 0 seconds
1 gem installed
➜  ~ irb
irb(main):001> require 'jaro_winkler'
true
irb(main):002> 
irb(main):003> JaroWinkler.similarity "MARTHA", "MARHTA"
Traceback (most recent call last):
	17: from /home/sidney/.rbenv/versions/2.7.3/bin/irb:23:in `<main>'
	16: from /home/sidney/.rbenv/versions/2.7.3/bin/irb:23:in `load'
	15: from /home/sidney/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/irb-1.10.0/exe/irb:9:in `<top (required)>'
(irb):3:in `<main>': undefined method `similarity' for JaroWinkler:Module (NoMethodError)
irb(main):004> 
irb(main):005> JaroWinkler.jaro_similarity "MARTHA", "MARHTA"
Traceback (most recent call last):
	17: from /home/sidney/.rbenv/versions/2.7.3/bin/irb:23:in `<main>'
	16: from /home/sidney/.rbenv/versions/2.7.3/bin/irb:23:in `load'
	15: from /home/sidney/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/irb-1.10.0/exe/irb:9:in `<top (required)>'
(irb):5:in `<main>': undefined method `jaro_similarity' for JaroWinkler:Module (NoMethodError)
irb(main):006> JaroWinkler.jaro_distance "MARTHA", "MARHTA"
0.9444444444444445

Anything I did wrong ? Thank you

@tonytonyjan
Copy link
Owner

hi @shideneyu

Sorry, I changed the README but forgot to push the v1.6.0 to rubygems.org.

λ gem install jaro_winkler
Fetching jaro_winkler-1.6.0.gem
Building native extensions. This could take a while...
Successfully installed jaro_winkler-1.6.0
1 gem installed
λ ruby -r jaro_winkler -e 'puts JaroWinkler.similarity "MARTHA", "MARHTA"'
0.9611111111111111

Thanks for the reporting. Can you retry with the version 1.6.0 and let me know if you have any issue? Thanks!

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