public class LanguageUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Logger |
LOGGER |
Modifier and Type | Method and Description |
---|---|
static LanguageUtilities |
getInstance() |
protected static void |
getNewInstance()
Return a new instance.
|
Language |
runLanguageId(java.lang.String text)
Basic run for language identification, return the language code and
confidence score separated by a semicolon
|
Language |
runLanguageId(java.lang.String text,
int maxLength)
Less basic run for language identification, where a maxumum length of text is used to
identify the language.
|
public static LanguageUtilities getInstance()
protected static void getNewInstance()
public Language runLanguageId(java.lang.String text)
text
- text to classifypublic Language runLanguageId(java.lang.String text, int maxLength)
text
- text to classifymaxLength
- maximum length of text to be used to identify the language, expressed in characters