tonytonyjan / jaro_winkler

Ruby & C implementation of Jaro-Winkler distance algorithm which supports UTF-8 string.
MIT License
193 stars 29 forks source link

DEFAULT_ADJ_TABLE is not being initialized #4

Closed tepperly closed 9 years ago

tepperly commented 9 years ago

I've been using jaro_winkler for ham radio contest scoring, and it has been extremely useful. I was looking into making my own adjustment table, and I noticed that DEFAULT_ADJ_TABLE is not being initialized as I think you expect.

$ irb --version
irb 0.9.6(09/06/30)
$ ruby --version
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
$ irb
irb(main):001:0> require 'jaro_winkler/adjusting_table'
=> true
irb(main):002:0> JaroWinkler::DEFAULT_ADJ_TABLE
=> {}

I've also reproduced this on with ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux].

Thanks,

Tom

tonytonyjan commented 9 years ago

@tepperly Thanks for reporting this issue, I've add some comment on your pull request #5.

FYI, the custom adjusting table is still in todo list (as shown in README), since I am rewriting the part of C extension to improve performance, this feature is still pending.