commons-codec
commons-codec copied to clipboard
CODEC-281: Double metaphone encode kc as K
Double metaphone should handle 'K' for 'kc' entries instead of 'KK'
One example is Kirkcaldy: which is presently encoded as "KRKK".
When omitting 'k' or 'c' letters (for example, Kircaldy or Kirkaldy) it is encoded as "KRKL".
The correction consists to verify when letter 'c' follows 'k', if 'c' is encoded as 'K', it is ignored as for a succession of 'kk' letters. With this correction, Kirkcaldy would be encoded as "KRKL" which is more discriminant and compliant with the phonetic.