public class Lingo24LangDetector
extends org.apache.tika.language.detect.LanguageDetector
langdetect.lingo24.properties file.| Constructor and Description |
|---|
Lingo24LangDetector()
Default constructor which first checks for the presence of
the
langdetect.lingo24.properties file to set the API Key. |
| Modifier and Type | Method and Description |
|---|---|
void |
addText(char[] cbuf,
int off,
int len) |
List<org.apache.tika.language.detect.LanguageResult> |
detectAll() |
boolean |
hasModel(String language) |
boolean |
isAvailable() |
org.apache.tika.language.detect.LanguageDetector |
loadModels() |
org.apache.tika.language.detect.LanguageDetector |
loadModels(Set<String> set) |
void |
reset() |
org.apache.tika.language.detect.LanguageDetector |
setPriors(Map<String,Float> languageProbabilities) |
public Lingo24LangDetector()
langdetect.lingo24.properties file to set the API Key.
If a key is available, it sets the detector as available and also loads the languages supported by the detector.
public org.apache.tika.language.detect.LanguageDetector loadModels()
throws IOException
loadModels in class org.apache.tika.language.detect.LanguageDetectorIOExceptionpublic org.apache.tika.language.detect.LanguageDetector loadModels(Set<String> set) throws IOException
loadModels in class org.apache.tika.language.detect.LanguageDetectorIOExceptionpublic boolean hasModel(String language)
hasModel in class org.apache.tika.language.detect.LanguageDetectorpublic org.apache.tika.language.detect.LanguageDetector setPriors(Map<String,Float> languageProbabilities) throws IOException
setPriors in class org.apache.tika.language.detect.LanguageDetectorIOExceptionpublic void reset()
reset in class org.apache.tika.language.detect.LanguageDetectorpublic void addText(char[] cbuf,
int off,
int len)
addText in class org.apache.tika.language.detect.LanguageDetectorpublic List<org.apache.tika.language.detect.LanguageResult> detectAll()
detectAll in class org.apache.tika.language.detect.LanguageDetectorpublic boolean isAvailable()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.