edu.cmu.minorthird.text
Class AbstractAnnotator

java.lang.Object
  extended by edu.cmu.minorthird.text.AbstractAnnotator
All Implemented Interfaces:
Annotator
Direct Known Subclasses:
ClassifierAnnotator, ConditionalSemiMarkovModel.CSMMAnnotator, ConfidenceReportingSequenceAnnotator, EncapsulatedAnnotator, ExtractAbbrev, MixupAnnotator, MultiClassifierAnnotator, NameMatcher, OnlineBinaryTextClassifierLearner, SegmentAnnotatorLearner.SegmentAnnotator, SequenceAnnotatorLearner.SequenceAnnotator, StartEndLengthAnnotator, StringAnnotator, URLAnnotator

public abstract class AbstractAnnotator
extends java.lang.Object
implements Annotator

Generic implementation of an annotator.

Author:
William Cohen

Constructor Summary
AbstractAnnotator()
           
 
Method Summary
 void annotate(MonotonicTextLabels labels)
          Add some extra information to the labels.
 TextLabels annotatedCopy(TextLabels labels)
          Create a copy of the labels with some additional information added.
protected abstract  void doAnnotate(MonotonicTextLabels labels)
          The implementation for this method annotates labels in-line.
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAnnotator

public AbstractAnnotator()
Method Detail

doAnnotate

protected abstract void doAnnotate(MonotonicTextLabels labels)
The implementation for this method annotates labels in-line.


explainAnnotation

public abstract 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.

Specified by:
explainAnnotation in interface Annotator

annotate

public final void annotate(MonotonicTextLabels labels)
Description copied from interface: Annotator
Add some extra information to the labels.

Specified by:
annotate in interface Annotator

annotatedCopy

public final TextLabels annotatedCopy(TextLabels labels)
Description copied from interface: Annotator
Create a copy of the labels with some additional information added.

Specified by:
annotatedCopy in interface Annotator