@Test public void normalize_sedzia_sadu_okregowego() { assertEquals("Jan Nowak", judgeNameNormalizer.normalize("Sędzia Sądu Okręgowego Jan \t Sędzia Nowak Sędzia ")); assertEquals("Aleksandra Nowicka", judgeNameNormalizer.normalize("Sędzia SO Aleksandra Nowicka")); assertEquals("Elżbieta Gawryszczak", judgeNameNormalizer.normalize("Sędzia S O Elżbieta Gawryszczak")); assertEquals("Agnieszka Leżańska", judgeNameNormalizer.normalize("S. S.o Agnieszka Leżańska")); assertEquals("Tomasz Jaskłowski", judgeNameNormalizer.normalize("S S O Tomasz Jaskłowski")); assertEquals("Barbara Kubasik", judgeNameNormalizer.normalize("S.s.o Barbara Kubasik")); assertEquals("Hanna Matuszewska", judgeNameNormalizer.normalize("So. Hanna Matuszewska")); assertEquals("Barbara Frankowska", judgeNameNormalizer.normalize("Soo Barbara Frankowska")); assertEquals("Katarzyna Bojańczyk", judgeNameNormalizer.normalize("Sędzia S.O. Katarzyna Bojańczyk")); }
public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); } }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  String normalize(String judgeName); @PostConstruct void postConstruct(); void setPartsToRemove(String[] partsToRemove); void setRegexesToRemove(String[] regexesToRemove); }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  String normalize(String judgeName); @PostConstruct void postConstruct(); void setPartsToRemove(String[] partsToRemove); void setRegexesToRemove(String[] regexesToRemove);  }