org.simmetrics.simplifiers.ColognePhonetic Maven / Gradle / Ivy
package org.simmetrics.simplifiers;
/**
* Encodes a string into a Cologne Phonetic value.
*
* Implements the Kölner
* Phonetik (Cologne Phonetic) algorithm issued by Hans Joachim Postel in
* 1969.
*
*
* The Kölner Phonetik is a phonetic algorithm which is optimized
* for the German language. It is related to the well-known soundex algorithm.
*
*
*
* This class is immutable and thread-safe.
*
*
* @see org.apache.commons.codec.language.ColognePhonetic
*/
public class ColognePhonetic implements Simplifier {
private final org.apache.commons.codec.language.ColognePhonetic simplifier = new org.apache.commons.codec.language.ColognePhonetic();
@Override
public String simplify(String input) {
return simplifier.encode(input);
}
@Override
public String toString() {
return "ColognePhonetic";
}
}