rzo1 commented on code in PR #487: URL: https://github.com/apache/opennlp/pull/487#discussion_r1066914169
########## opennlp-uima/src/main/java/opennlp/uima/normalizer/NumberUtil.java: ########## @@ -90,12 +68,8 @@ public static Number parse(String number, String languageCode) } Locale locale = new Locale(languageCode); - NumberFormat numberFormat = NumberFormat.getInstance(locale); - - number = number.trim(); - number = removeChar(number, ' '); - + number = number.replaceAll("\\s", ""); Review Comment: Possible follow up: https://issues.apache.org/jira/browse/OPENNLP-1441 (created in discussion with @mawiesne to improve performance throughout the code base) ########## opennlp-uima/src/main/java/opennlp/uima/normalizer/NumberUtil.java: ########## @@ -90,12 +68,8 @@ public static Number parse(String number, String languageCode) } Locale locale = new Locale(languageCode); - NumberFormat numberFormat = NumberFormat.getInstance(locale); - - number = number.trim(); - number = removeChar(number, ' '); - + number = number.replaceAll("\\s", ""); Review Comment: Possible follow up: https://issues.apache.org/jira/browse/OPENNLP-1441 (created in discussion with @mawiesne to improve performance throughout the code base). Martin will have a look. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org