jamesturk / jellyfish

🪼 a python library for doing approximate and phonetic matching of strings.
https://jamesturk.github.io/jellyfish/
MIT License
2.07k stars 160 forks source link

BUG: In Which We Match the C Version's Behavior for Ws Followed By Vowels in Metaphones #86

Closed waltaskew closed 7 years ago

waltaskew commented 7 years ago

There's a discrepancy between the C and Python jellyfish implementations for metaphone with what it does for W's followed by vowels. metaphone('Walt') is 'WLT' in the C and 'LT' in the Python versions. It looks like 'WLT' should be the correct behavior.

I guess it is a good thing both that my name is Walt and that I've been forced to use the pure Python rather than C version of this function in two different places!

C version: https://github.com/jamesturk/cjellyfish/blob/7dd0c08aec07833958a6f3d115af88c585e3ba0b/metaphone.c#L160

Test case provided in https://github.com/jamesturk/jellyfish-testdata/pull/4