|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.doccat.DocumentCategorizerEvaluator
public class DocumentCategorizerEvaluator
The DocumentCategorizerEvaluator
measures the performance of
the given DocumentCategorizer
with the provided reference
DocumentSample
s.
DocumentCategorizer
,
DocumentSample
Constructor Summary | |
---|---|
DocumentCategorizerEvaluator(DocumentCategorizer categorizer)
Initializes the current instance. |
Method Summary | |
---|---|
void |
evaluate(Iterator<DocumentSample> samples)
Reads all DocumentSample objects from the stream
and evaluates each DocumentSample object with
#evaluateSample(POSSample) method. |
void |
evaluteSample(DocumentSample sample)
Evaluates the given reference DocumentSample object. |
double |
getAccuracy()
Retrieves the accuracy of provided DocumentCategorizer . |
String |
toString()
Represents this objects as human readable String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DocumentCategorizerEvaluator(DocumentCategorizer categorizer)
categorizer
- Method Detail |
---|
public void evaluteSample(DocumentSample sample)
DocumentSample
object.
This is done by categorizing the document from the provided
DocumentSample
. The detected category is then used
to calculate and update the score.
reference
- the reference TokenSample
.public void evaluate(Iterator<DocumentSample> samples)
DocumentSample
objects from the stream
and evaluates each DocumentSample
object with
#evaluateSample(POSSample)
method.
samples
- the stream of reference POSSample
which
should be evaluated.public double getAccuracy()
DocumentCategorizer
.
accuracy = correctly categorized documents / total documents
public String toString()
String
.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |