public interface DocumentCategorizer
Modifier and Type | Method and Description |
---|---|
double[] |
categorize(String documentText)
Deprecated.
will be removed after 1.7.1 release. Don't use it.
|
double[] |
categorize(String[] text)
Categorizes the given text, provided in separate tokens.
|
double[] |
categorize(String[] text,
Map<String,Object> extraInformation)
Deprecated.
will be removed after 1.7.1 release. Don't use it.
|
double[] |
categorize(String documentText,
Map<String,Object> extraInformation)
categorize a piece of text, providing extra metadata.
|
String |
getAllResults(double[] results)
get the name of the category associated with the given probabilties
|
String |
getBestCategory(double[] outcome)
get the best category from previously generated outcome probabilities
|
String |
getCategory(int index)
get the category at a given index
|
int |
getIndex(String category)
get the index of a certain category
|
int |
getNumberOfCategories()
get the number of categories
|
Map<String,Double> |
scoreMap(String text)
Deprecated.
will be removed after 1.7.1 release. Don't use it.
|
Map<String,Double> |
scoreMap(String[] text)
Returns a map in which the key is the category name and the value is the score
|
SortedMap<Double,Set<String>> |
sortedScoreMap(String text)
Deprecated.
will be removed after 1.7.1 release. Don't use it.
|
SortedMap<Double,Set<String>> |
sortedScoreMap(String[] text)
Get a map of the scores sorted in ascending aorder together with their associated categories.
|
double[] categorize(String[] text)
text
- the tokens of text to categorize@Deprecated double[] categorize(String[] text, Map<String,Object> extraInformation)
text
- the tokens of text to categorizeextraInformation
- optional extra information to pass for evaluationString getBestCategory(double[] outcome)
outcome
- a vector of outcome probabilitiesint getIndex(String category)
category
- the categoryString getCategory(int index)
index
- the indexint getNumberOfCategories()
@Deprecated double[] categorize(String documentText)
documentText
- the text to categorizedouble[] categorize(String documentText, Map<String,Object> extraInformation)
documentText
- the text to categorizeextraInformation
- extra metadataString getAllResults(double[] results)
results
- the probabilities of each category@Deprecated Map<String,Double> scoreMap(String text)
text
- the input text to classifyMap<String,Double> scoreMap(String[] text)
text
- the input text to classify@Deprecated SortedMap<Double,Set<String>> sortedScoreMap(String text)
text
- the input text to classifySortedMap<Double,Set<String>> sortedScoreMap(String[] text)
text
- the input text to classifyCopyright © 2017 The Apache Software Foundation. All rights reserved.