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 LanguageDetector
public Language predictLanguage(CharSequence content)
predictLanguage
in interface LanguageDetector
public String[] getSupportedLanguages()
getSupportedLanguages
in interface LanguageDetector
public static LanguageDetectorModel train(ObjectStream<LanguageSample> samples, TrainingParameters mlParams, LanguageDetectorFactory factory) throws IOException
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.