Package opennlp.uima.normalizer
Class NumberUtil
java.lang.Object
opennlp.uima.normalizer.NumberUtil
Provides methods to parse numbers which occur in natural language texts.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NumberUtil
public NumberUtil()
-
-
Method Details
-
isLanguageSupported
Checks if the language is supported.- Parameters:
languageCode- A ISO conform language code, e.g. "en", "pt"- Returns:
- true if the language is supported
-
parse
Parses a specifiednumberfor a certainlanguageCode.- Parameters:
number- The suspected number to parse.languageCode- A ISO conform language code, e.g. "en", "pt"- Returns:
- The parsed
Number. - Throws:
ParseException- Thrown if errors occurred during parsing.IllegalArgumentException- Thrown if thelanguageCodeis not supported.
-