edu.cmu.minorthird.text.learn
Class AnnotationExample
java.lang.Object
edu.cmu.minorthird.text.learn.AnnotationExample
public class AnnotationExample
- extends java.lang.Object
Feedback for an annotation learner.
- Author:
- William Cohen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OUTSIDE
public static java.lang.String OUTSIDE
INSIDE
public static java.lang.String INSIDE
START
public static java.lang.String START
END
public static java.lang.String END
NOT_START_OR_END
public static java.lang.String NOT_START_OR_END
AnnotationExample
public AnnotationExample(Span document,
TextLabels labels,
java.lang.String inputSpanType,
java.lang.String inputSpanProp)
- Parameters:
document
- give feedback to learner about this documentlabels
- feedback information is in these labelsinputSpanType
- learner will learn how to extract spans of this typeinputSpanProp
- learner will classify extracted spans according to this type
getDocumentSpan
public Span getDocumentSpan()
getLabels
public TextLabels getLabels()
getInputType
public java.lang.String getInputType()
getInputProp
public java.lang.String getInputProp()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getClassName
public java.lang.String getClassName(Span span)
- Return the name of the class associated with this span. If
inputSpanType is defined, the class name will be POS or NEG;
otherwise, if inputSpanProp is defined, the class name will be
the property value assigned, or NEG.
labelTokensInsideOutside
public TextLabels labelTokensInsideOutside(java.lang.String prop)
labelTokensStartEnd
public TextLabels labelTokensStartEnd(java.lang.String prop)