public interface DocumentClassifier
| Modifier and Type | Method and Description |
|---|---|
String |
classify(String[] text)
Classifies the given text, provided in separate tokens.
|
double[] |
classifyProb(String[] text)
Classifies the given text, provided in separate tokens.
|
void |
clearFeatureData()
Informs the feature generator that the context of the data in the context (typically a document)
is no longer valid.
|
String |
getAllLabels(double[] results)
Get the label associated with the given probabilities.
|
String |
getBestLabel(double[] outcome)
Get the best label from previously generated outcome probabilities.
|
int |
getIndex(String label)
Get the index of a certain label.
|
String |
getLabel(int index)
Get the category at a given index.
|
int |
getNumberOfLabels()
get the number of found labels.
|
Map<String,Double> |
scoreMap(String[] text)
Returns a map in which the key is the label name and the value is the score.
|
SortedMap<Double,Set<String>> |
sortedScoreMap(String[] text)
Get a map of the scores sorted in ascending order together with their associated labels.
|
String classify(String[] text)
text - the tokens of text to classifydouble[] classifyProb(String[] text)
text - the tokens of text to classifyString getBestLabel(double[] outcome)
outcome - a vector of outcome probabilitiesint getIndex(String label)
label - the labelString getLabel(int index)
index - the indexint getNumberOfLabels()
String getAllLabels(double[] results)
results - the probabilities of each labelMap<String,Double> scoreMap(String[] text)
text - the input text to classifySortedMap<Double,Set<String>> sortedScoreMap(String[] text)
text - the input text to classifyvoid clearFeatureData()
Copyright © 2017 IXA pipes. All rights reserved.