[Schmitzm-commits] r2175 - in trunk/schmitzm-adresses/src: main/java/de/schmitzm/adresses test/java/de/schmitzm/adresses

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Dec 21 12:44:35 CET 2012


Author: alfonx
Date: 2012-12-21 12:44:35 +0100 (Fri, 21 Dec 2012)
New Revision: 2175

Modified:
   trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
   trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
Log:


Modified: trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
===================================================================
--- trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java	2012-12-18 17:48:17 UTC (rev 2174)
+++ trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java	2012-12-21 11:44:35 UTC (rev 2175)
@@ -538,6 +538,7 @@
 		strasse = rC.replaceAll(strasse, "str$", "strasse");
 		strasse = rC.replaceAll(strasse, "str[\\.\\s]", "strasse");
 		strasse = rC.replaceAll(strasse, "strase", "strasse");
+		strasse = rC.replaceAll(strasse, "stra[^a-z]e", "strasse");
 		strasse = rC.replaceAll(strasse, "ßtrase", "strasse");
 		strasse = rC.replaceAll(strasse, "alle\\b", "allee");
 		strasse = rC.replaceAll(strasse, "alee\\b", "allee");
@@ -658,6 +659,7 @@
 		strasse = RegexCache.getInstance().replaceAll(strasse, "\\s*\\(.*?\\)\\s*", "");
 
 		strasse = RegexCache.getInstance().replaceAll(strasse, "str\\.ße", "str.");
+		strasse = RegexCache.getInstance().replaceAll(strasse, "stra[^a-z]e", "str.");
 
 		strasse = RegexCache.getInstance().replaceAll(strasse, "\\bStr\\./hausnummer:?", "");
 		strasse = RegexCache.getInstance().replaceAll(strasse, "hausnummer", " ");

Modified: trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
===================================================================
--- trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-12-18 17:48:17 UTC (rev 2174)
+++ trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-12-21 11:44:35 UTC (rev 2175)
@@ -354,6 +354,8 @@
 		assertEquals("aufmhennekamp", AddrStringUtil.normalizeStr("Auf`m Hennekamp"));
 		assertEquals("aufmhennekamp", AddrStringUtil.normalizeStr("Auf^m Hennekamp"));
 		
+		assertEquals("seestrasse", AddrStringUtil.normalizeStr("Seestraãe"));
+		
 		assertEquals("a2", AddrStringUtil.normalizeStr("Planken A 2"));
 		assertEquals("a2", AddrStringUtil.normalizeStr("Planken A2"));
 		assertEquals("lilienthalstrasse", AddrStringUtil.normalizeStr("Lilienthalstraße (ggü. Haus 7)"));



More information about the Schmitzm-commits mailing list