Package opennlp.uima.normalizer
Class NumberUtil
- java.lang.Object
-
- opennlp.uima.normalizer.NumberUtil
-
public final class NumberUtil extends Object
This class contains methods to parse numbers which occur in natural language texts.
-
-
Constructor Summary
Constructors Constructor Description NumberUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isLanguageSupported(String languageCode)
Checks if the language is supported.static Number
parse(String number, String languageCode)
Gives its best to parse the provided number.
-
-
-
Method Detail
-
isLanguageSupported
public static boolean isLanguageSupported(String languageCode)
Checks if the language is supported.- Parameters:
languageCode
- language code, e.g. "en", "pt"- Returns:
- true if the language is supported
-
parse
public static Number parse(String number, String languageCode) throws ParseException
Gives its best to parse the provided number.- Parameters:
number
- number to parselanguageCode
- language code, e.g. "en", "pt"- Returns:
- parsed number
- Throws:
ParseException
- ParseException
-
-