public class LanguageDetectorME extends Object implements LanguageDetector
| Constructor and Description |
|---|
LanguageDetectorME(LanguageDetectorModel model)
Initializes the current instance with a language detector model.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getSupportedLanguages() |
Language |
predictLanguage(CharSequence content) |
Language[] |
predictLanguages(CharSequence content) |
static LanguageDetectorModel |
train(ObjectStream<LanguageSample> samples,
TrainingParameters mlParams,
LanguageDetectorFactory factory) |
public LanguageDetectorME(LanguageDetectorModel model)
model - the language detector modelpublic Language[] predictLanguages(CharSequence content)
predictLanguages in interface LanguageDetectorpublic Language predictLanguage(CharSequence content)
predictLanguage in interface LanguageDetectorpublic String[] getSupportedLanguages()
getSupportedLanguages in interface LanguageDetectorpublic static LanguageDetectorModel train(ObjectStream<LanguageSample> samples, TrainingParameters mlParams, LanguageDetectorFactory factory) throws IOException
IOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.