### Question:
WrittenNumbersNormalizer implements
		org.apache.uima.annotator.regex.extension.Normalization { public static Long text2num(String s) { String[] a = s.split("\\s|-"); if (a.length == 0) throw new NumberFormatException("cannot parse " + s); long n = 0l, g = 0l; for (String w : a) { if (small.containsKey(w)) { g += small.get(w); } else if (w.equals("hundred")) { g *= 100; } else if (w.equals("and")) { } else if (magnitude.containsKey(w)) { n += g * magnitude.get(w); g = 0; } else { throw new NumberFormatException("cannot parse " + s); } } return n + g; }  String normalize(String input, String ruleId); static Long text2num(String s);  }### Answer:
@Test public void test() { assertEquals(new Long(1), text2num("one")); assertEquals(new Long(12), text2num("twelve")); assertEquals(new Long(72), text2num("seventy two")); assertEquals(new Long(72), text2num("seventy-two")); assertEquals(new Long(300), text2num("three hundred")); assertEquals(new Long(302), text2num("three hundred and two")); assertEquals(new Long(1200), text2num("twelve hundred")); assertEquals(new Long(1200), text2num("one thousand two hundred")); assertEquals(new Long(12304), text2num("twelve thousand three hundred four")); assertEquals(new Long(6000000), text2num("six million")); assertEquals(new Long(6400005), text2num("six million four hundred thousand five")); assertEquals(new Long(6400025), text2num("six million four hundred thousand and twenty five")); }