Package org.apache.tika.eval.langid
Class LanguageIDWrapper
- java.lang.Object
-
- org.apache.tika.eval.langid.LanguageIDWrapper
-
- All Implemented Interfaces:
StringStatsCalculator<List<Language>>
,TextStatsCalculator
public class LanguageIDWrapper extends Object implements StringStatsCalculator<List<Language>>
The most efficient way to call this in a multithreaded environment is to callloadBuiltInModels()
before instantiating the
-
-
Constructor Summary
Constructors Constructor Description LanguageIDWrapper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Language>
calculate(String txt)
List<Language>
getProbabilities(String s)
String[]
getSupportedLanguages()
static void
loadBuiltInModels()
static void
loadModels(Path path)
static void
setMaxTextLength(int maxTextLength)
-
-
-
Method Detail
-
loadBuiltInModels
public static void loadBuiltInModels() throws IOException
- Throws:
IOException
-
loadModels
public static void loadModels(Path path) throws IOException
- Throws:
IOException
-
getSupportedLanguages
public String[] getSupportedLanguages()
-
setMaxTextLength
public static void setMaxTextLength(int maxTextLength)
-
-