CODEC-281: Double metaphone encode kc as K - #36
Conversation
|
Having a look, I found what I believe to be the vanilla version of the algorithm from its author. It doesn't appear to do the additional check to handle 'c' to me. Is this an improvement outside of the official algorithm or is there a source for this change? |
|
@sguill |
|
@sguill ping? |
|
2026 ping @sguill |
|
Yes, it is an improvement outside of the official algorithm. |
|
Hmm, then we should probably not put it in this class. Would the change be compatible with "Metaphone 3", see https://github.com/OpenRefine/OpenRefine/blob/master/main/src/com/google/refine/clustering/binning/Metaphone3.java Maybe we need a new Metaphone3 class... |
|
@sguill |
Yes, this is an improvement outside of the official algorithm, there is no source for this change. |
|
If there is a true use case for this change, I propose that we create an extension of |
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.