commons-codec icon indicating copy to clipboard operation
commons-codec copied to clipboard

CODEC-281: Double metaphone encode kc as K

Open sguill opened this issue 5 years ago • 4 comments

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.

sguill avatar Feb 18 '20 14:02 sguill

Coverage Status

Coverage increased (+0.01%) to 93.853% when pulling eb9ca3d53badf69e94b1c90cc6c7daea4638015a on sguill:CODEC-281-DoubleMetaphoneKC into 126f90424cc8f62d928686ec20c6c8bd944b527b on apache:master.

coveralls avatar Feb 18 '20 14:02 coveralls