[Schmitzm-commits] r2080 - 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
Wed Sep 5 23:51:02 CEST 2012


Author: alfonx
Date: 2012-09-05 23:51:01 +0200 (Wed, 05 Sep 2012)
New Revision: 2080

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-09-03 19:47:17 UTC (rev 2079)
+++ trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java	2012-09-05 21:51:01 UTC (rev 2080)
@@ -490,6 +490,7 @@
 		strasse = RegexCache.getInstance().replaceAll(strasse, "strassex$", "strasse");
 		strasse = RegexCache.getInstance().replaceAll(strasse, "alleex$", "allee");
 
+		strasse = RegexCache.getInstance().replaceAll(strasse, "str$", "strasse");
 		strasse = RegexCache.getInstance().replaceAll(strasse, "str[\\.\\s]", "strasse");
 		strasse = RegexCache.getInstance().replaceAll(strasse, "strase", "strasse");
 		strasse = RegexCache.getInstance().replaceAll(strasse, "ßtrase", "strasse");

Modified: trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
===================================================================
--- trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-09-03 19:47:17 UTC (rev 2079)
+++ trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java	2012-09-05 21:51:01 UTC (rev 2080)
@@ -288,6 +288,8 @@
 
 	@Test
 	public void testNormalizeStrasse() {
+		assertEquals("triererstrasse", AddrStringUtil.normalizeStr("Trierer Str"));
+		assertEquals("marktstrasse", AddrStringUtil.normalizeStr("Marktstrasse"));
 		assertEquals("jaegerndorferzeile", AddrStringUtil.normalizeStr("Jägerndorfer Zeile"));
 		assertEquals("weststrasse", AddrStringUtil.normalizeStr("West  Straße"));
 		assertEquals("weststrasse", AddrStringUtil.normalizeStr("West  Str."));



More information about the Schmitzm-commits mailing list