List of usage examples for org.apache.commons.codec.language ColognePhonetic isEncodeEqual
public boolean isEncodeEqual(String text1, String text2)
From source file:org.emau.icmvc.ganimed.epix.deduplication.impl.DeduplicationEngineTest.java
@Test public void testColognePhonetic() throws EncoderException { Soundex sx = new Soundex(); ColognePhonetic cp = new ColognePhonetic(); //FellegiSunterAlgorithm fsa = new FellegiSunterAlgorithm<String>(); String toBlock = "Karl-Heinz"; String candidate = "Katl-Heinz"; System.out.println("Cologne Phonetik PCODE1: " + cp.colognePhonetic(toBlock)); System.out.println("Cologne Phonetik PCODE2: " + cp.colognePhonetic(candidate)); System.out.println("Soundex PCODE1: " + sx.encode(toBlock)); System.out.println("Soundex PCODE2: " + sx.encode(candidate)); System.out.println("Soundex PCODE1: " + sx.encode(toBlock)); System.out.println("Soundex PCODE2: " + sx.encode(candidate)); //System.out.println("FellegiSunter PCODE1: " + fsa); boolean bool = cp.isEncodeEqual(toBlock, candidate); System.out.println("Blocking: " + toBlock + " " + candidate + " " + bool); System.out.println("Decition " + bool + " " + (bool ? 1 : 0)); /*/*w w w.ja v a 2s . c o m*/ PreprocessingStrategy<Patient> ps = new CommonPreprocessor<Patient>(); ps.preprocess(cp); DeduplicationStrategy<Patient> ds = new FellegiSunterAlgorithm<Patient>(); ds.setMatchingConfiguration(matchingConfiguration); ds.match(toMatch, candidate) */ }