I'm trying to use the DoubleMetaphone comparison and it does not seem to be returning the correct answer (though maybe it is!). Below are the result of comparing the string 'is' to 'a' for both the Metaphone and DoubleMetaphone. Obviously these don't sound the same but the DoubleMetaphone seems to be saying that they do - not totally sure that this is a bug or a limitation of the algorithm. The Metaphone on the other hand seems to be working properly.
let natural=require('natural')
undefined
natural.DoubleMetaphone.compare('is','a')
true
natural.Metaphone.compare('is','a')
false
there are some reference implementations here and here im not super familiar with the algorithm but it does seem like a possible bug. ill check into it and try to get to the bottom of it.
I'm trying to use the DoubleMetaphone comparison and it does not seem to be returning the correct answer (though maybe it is!). Below are the result of comparing the string 'is' to 'a' for both the Metaphone and DoubleMetaphone. Obviously these don't sound the same but the DoubleMetaphone seems to be saying that they do - not totally sure that this is a bug or a limitation of the algorithm. The Metaphone on the other hand seems to be working properly.