Package opennlp.tools.langdetect
Interface LanguageDetector
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
LanguageDetectorME
public interface LanguageDetector extends Serializable
The interface forLanguageDetector
which predicts theLanguage
for a context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getSupportedLanguages()
Language
predictLanguage(CharSequence content)
Predicts theLanguage
for the fullcontent
length.Language[]
predictLanguages(CharSequence content)
Predicts thelanguages
for the fullcontent
length.
-
-
-
Method Detail
-
predictLanguages
Language[] predictLanguages(CharSequence content)
Predicts thelanguages
for the fullcontent
length.- Parameters:
content
- The textual content to detect potentiallanguages
from.- Returns:
- the predicted languages
-
predictLanguage
Language predictLanguage(CharSequence content)
Predicts theLanguage
for the fullcontent
length.- Parameters:
content
- The textual content to detect potentiallanguages
from.- Returns:
- the language with the highest confidence
-
getSupportedLanguages
String[] getSupportedLanguages()
- Returns:
- Retrieves an array of language (codes) that are supported by a
LanguageDetector
.
-
-