public class LanguageCategorizer extends Object implements Categorizer
Modifier and Type | Field and Description |
---|---|
protected org.knallgrau.utils.textcat.TextCategorizer |
languageGuesser |
protected static Map<String,String> |
languageNameToISO639Code |
Constructor and Description |
---|
LanguageCategorizer(String modelFile) |
Modifier and Type | Method and Description |
---|---|
List<String> |
guessCategories(String textContent,
int maxSuggestions)
Compute a list of suggested categories, sorted by decreasing confidence based on the textual content of the
document.
|
List<String> |
guessCategories(String textContent,
int maxSuggestions,
Double precisionTreshold)
Compute a list of suggested categories, sorted by decreasing confidence based on the textual content of the
document.
|
protected final org.knallgrau.utils.textcat.TextCategorizer languageGuesser
protected static final Map<String,String> languageNameToISO639Code
public LanguageCategorizer(String modelFile)
public List<String> guessCategories(String textContent, int maxSuggestions)
Categorizer
guessCategories
in interface Categorizer
public List<String> guessCategories(String textContent, int maxSuggestions, Double precisionTreshold)
Categorizer
guessCategories
in interface Categorizer
precisionTreshold
- or null to use the default threshold of the implementation.Copyright © 2015 Nuxeo SA. All rights reserved.