|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.text.AbstractAnnotator edu.cmu.minorthird.text.learn.OnlineBinaryTextClassifierLearner
public class OnlineBinaryTextClassifierLearner
Provides a way to Edit document labels and add them to the learner
Field Summary | |
---|---|
OnlineClassifierLearner |
learner
|
java.lang.String |
outputType
|
java.lang.String |
spanType
|
Constructor Summary | |
---|---|
OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner,
java.lang.String spanType)
|
|
OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner,
java.lang.String spanType,
TextLabels labeledData)
|
|
OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner,
java.lang.String spanType,
TextLabels labeledData,
SpanFeatureExtractor fe)
|
Method Summary | |
---|---|
void |
addDocument(java.lang.String label,
java.lang.String text)
Provide document string with a label and add to the learner |
void |
completeTraining()
Tells the learner that no more examples are coming |
void |
doAnnotate(MonotonicTextLabels labels)
The implementation for this method annotates labels in-line. |
java.lang.String |
explainAnnotation(TextLabels labels,
Span documentSpan)
The implementation for this method should explain how annotation would be added to some part of the text base. |
ClassifierAnnotator |
getAnnotator()
|
Classifier |
getClassifier()
Returns the Classifier |
TextClassifier |
getTextClassifier()
Returns the TextClassifier |
java.lang.String[] |
getTypes()
Returns an array of spanTypes that can be added to the learner |
void |
reset()
Erases all previous data from the learner |
Methods inherited from class edu.cmu.minorthird.text.AbstractAnnotator |
---|
annotate, annotatedCopy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.minorthird.text.learn.OnlineTextClassifierLearner |
---|
annotatedCopy |
Field Detail |
---|
public OnlineClassifierLearner learner
public java.lang.String spanType
public java.lang.String outputType
Constructor Detail |
---|
public OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner, java.lang.String spanType)
public OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner, java.lang.String spanType, TextLabels labeledData)
public OnlineBinaryTextClassifierLearner(OnlineClassifierLearner learner, java.lang.String spanType, TextLabels labeledData, SpanFeatureExtractor fe)
Method Detail |
---|
public void addDocument(java.lang.String label, java.lang.String text)
addDocument
in interface OnlineTextClassifierLearner
public TextClassifier getTextClassifier()
getTextClassifier
in interface OnlineTextClassifierLearner
public Classifier getClassifier()
OnlineTextClassifierLearner
getClassifier
in interface OnlineTextClassifierLearner
public void completeTraining()
completeTraining
in interface OnlineTextClassifierLearner
public void reset()
reset
in interface OnlineTextClassifierLearner
public java.lang.String[] getTypes()
OnlineTextClassifierLearner
getTypes
in interface OnlineTextClassifierLearner
public void doAnnotate(MonotonicTextLabels labels)
AbstractAnnotator
doAnnotate
in class AbstractAnnotator
public java.lang.String explainAnnotation(TextLabels labels, Span documentSpan)
AbstractAnnotator
explainAnnotation
in interface Annotator
explainAnnotation
in class AbstractAnnotator
public ClassifierAnnotator getAnnotator()
getAnnotator
in interface OnlineTextClassifierLearner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |