Search in sources :

Example 11 with LanguageDetector

use of org.apache.tika.language.detect.LanguageDetector in project tika by apache.

the class Lingo24LangDetectorTest method testLanguageLoad.

@Test
public void testLanguageLoad() {
    LanguageDetector detector = new Lingo24LangDetector();
    assumeTrue(((Lingo24LangDetector) detector).isAvailable());
    // Only check a couple
    assertTrue(detector.hasModel("ar"));
    assertTrue(detector.hasModel("de"));
}
Also used : LanguageDetector(org.apache.tika.language.detect.LanguageDetector) Test(org.junit.Test)

Aggregations

LanguageDetector (org.apache.tika.language.detect.LanguageDetector)11 LanguageResult (org.apache.tika.language.detect.LanguageResult)10 LanguageWriter (org.apache.tika.language.detect.LanguageWriter)7 Test (org.junit.Test)7 OptimaizeLangDetector (org.apache.tika.langdetect.OptimaizeLangDetector)4 File (java.io.File)1 InputStream (java.io.InputStream)1 Detector (org.apache.tika.detect.Detector)1 TikaInputStream (org.apache.tika.io.TikaInputStream)1 MediaType (org.apache.tika.mime.MediaType)1 MimeTypes (org.apache.tika.mime.MimeTypes)1 AutoDetectParser (org.apache.tika.parser.AutoDetectParser)1 ParseContext (org.apache.tika.parser.ParseContext)1 Parser (org.apache.tika.parser.Parser)1 BodyContentHandler (org.apache.tika.sax.BodyContentHandler)1 ContentHandler (org.xml.sax.ContentHandler)1