edu.cmu.minorthird.text.learn
Class AnnotationExample

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.AnnotationExample

public class AnnotationExample
extends java.lang.Object

Feedback for an annotation learner.

Author:
William Cohen

Field Summary
static java.lang.String END
           
static java.lang.String INSIDE
           
static java.lang.String NOT_START_OR_END
           
static java.lang.String OUTSIDE
           
static java.lang.String START
           
 
Constructor Summary
AnnotationExample(Span document, TextLabels labels, java.lang.String inputSpanType, java.lang.String inputSpanProp)
           
 
Method Summary
 java.lang.String getClassName(Span span)
          Return the name of the class associated with this span.
 Span getDocumentSpan()
           
 java.lang.String getInputProp()
           
 java.lang.String getInputType()
           
 TextLabels getLabels()
           
 TextLabels labelTokensInsideOutside(java.lang.String prop)
           
 TextLabels labelTokensStartEnd(java.lang.String prop)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

AnnotationExample

public AnnotationExample(Span document,
                         TextLabels labels,
                         java.lang.String inputSpanType,
                         java.lang.String inputSpanProp)
Parameters:
document - give feedback to learner about this document
labels - feedback information is in these labels
inputSpanType - learner will learn how to extract spans of this type
inputSpanProp - learner will classify extracted spans according to this type
Method Detail

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)