Closed Globegitter closed 9 years ago
Hello @Globegitter,
Well this is rather unfortunate. I'll give it a look as soon as possible. This bugs applies to the 0.1.9
version or the 0.1.8
?
For other cases, does the algorithm work correctly?
@Yomguithereal It applies to both. Otherwise it seems to be working really well - thanks for the library, it is really useful.
@Globegitter, I've checked this and can affirm the bug comes from the clojure part and therefore replicates into its JavaScript counterpart.
I can fix it but I have a problem here and you might be able to help me:
The Dice coefficient works using bigrams. So, traditionnally, if you compare h
and h
, this will return 0, which is a total nonsense since both strings are the same.
So here is the choice I have to make:
Any opinion?
I've fixed the implementation. You can install the latest dev version with the following command for node if needed:
npm i git+https://github.com/Yomguithereal/clj-fuzzy.git
Oh that is great thank you! How did you resolve it then?
Second choice. I found other libraries - in python notably - that prefer to fix the rationale of the algorithm. So I went with that so now h
/ h
--> 1.0
.
Awesome thank you, will test asap.
Just trying out this algorithm and seems the dice algorithm has some minor bugs (or I am not understanding it quite right):
These are the results I am getting with strings of length 0 and length 1, could this have anything to do with the input being characters rather than actual strings? Is that as intended?