Wrong codes being generated
andreialecu opened this issue · 3 comments
I've been troubleshooting some issues with text matching in something I'm working on and realized that this library generates wrong codes.
For example alexander
should encode to ALKS
but this library encodes it as ALNTR
. Also aleksander
encodes to ALKSNTR
. Matching is pretty much impaired by this.
Is this expected with this implementation?
For example alexander should encode to ALKS but this library encodes it as ALNTR. Also aleksander encodes to ALKSNTR. Matching is pretty much impaired by this.
Do you have a source for this?
@andreialecu Ping!
@wooorm Sorry, didn't see this.
The source is pretty much every other double-metaphone implementation that I have come across.
Also, I think that strings like alexander
and aleksander
should generate the same codes, otherwise phonetic matching would be pointless.
Here's what natural generates: https://runkit.com/58136f736c8dfa00144f2065/581b19b0bf25ea001464b5fc
The two match.
And here's what this package outputs:
https://runkit.com/58136f736c8dfa00144f2065/581b1a8b5f41420013e08436