public class TikaLanguageIdentifyService extends java.lang.Object implements LanguageIdentifyService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLE_ID
name of bundle.
|
static java.lang.String |
LANGUAGE_MAPPING
name of property file.
|
| Constructor and Description |
|---|
TikaLanguageIdentifyService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(ComponentContext context)
OSGI activation method.
|
java.lang.String |
getAlternativeName(java.lang.String isoLanguage) |
java.util.Set<java.lang.String> |
getSupportedLanguages() |
Language |
identify(java.lang.String content)
detect the language of the given text.
|
public static final java.lang.String BUNDLE_ID
public static final java.lang.String LANGUAGE_MAPPING
protected void activate(ComponentContext context)
public Language identify(java.lang.String content)
LanguageIdentifyServiceidentify in interface LanguageIdentifyServiceLanguage object describing the detection result, or null if detection was not possible.public java.util.Set<java.lang.String> getSupportedLanguages()
getSupportedLanguages in interface LanguageIdentifyServicepublic java.lang.String getAlternativeName(java.lang.String isoLanguage)
getAlternativeName in interface LanguageIdentifyServiceisoLanguage - ISO language code.