threedaymonk / text

Collection of text algorithms. gem install text
Other
586 stars 42 forks source link

Metaphone doesn't encode "ck" properly. #17

Closed jablan closed 10 years ago

jablan commented 10 years ago

ck should be encoded as k. Currently, it seems to result with kk.

Example:

metaphone('cock') should result with KK, not KKK.

threedaymonk commented 10 years ago

Are you using Metaphone for a profanity filter or something? :-P

You're quite right. This is a bug. I think I've fixed it.

jablan commented 10 years ago

Sorry, the original string was actually "Hitchcock", I just wanted to simplify it a bit for the example... :) Thanks for the fix, I plan to run this on a bunch of other strings so you may expect other bug reports too.