edu.cmu.minorthird.text
Class EncapsulatedAnnotator
java.lang.Object
edu.cmu.minorthird.text.AbstractAnnotator
edu.cmu.minorthird.text.EncapsulatedAnnotator
- All Implemented Interfaces:
- Annotator, java.io.Serializable
public class EncapsulatedAnnotator
- extends AbstractAnnotator
- implements java.io.Serializable
An annotator that 'requires' some type of annotation, but exports
only a selected set of spanTypes (maybe all of them) from the
annotated documents. The 'require' call is done in the context of
a particular set of files (e.g. mixup files). This is a wrapper
around EncapsulatingAnnotatorLoader.
- Author:
- William Cohen
- See Also:
- Serialized Form
Constructor Summary |
EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path)
|
EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path,
java.lang.String type)
|
EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path,
java.lang.String[] exportedTypes)
|
Method Summary |
protected 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. |
static void |
main(java.lang.String[] args)
Create a serialized annotator that 'requires' a particular
type of annotation in the context of a particular set of files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncapsulatedAnnotator
public EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path)
EncapsulatedAnnotator
public EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path,
java.lang.String type)
EncapsulatedAnnotator
public EncapsulatedAnnotator(java.lang.String requiredAnnotation,
java.lang.String path,
java.lang.String[] exportedTypes)
- Parameters:
exportedTypes
- - only span types from this list will actually
by exported by the annotator
doAnnotate
protected void doAnnotate(MonotonicTextLabels labels)
- Description copied from class:
AbstractAnnotator
- The implementation for this method annotates labels in-line.
- Specified by:
doAnnotate
in class AbstractAnnotator
explainAnnotation
public java.lang.String explainAnnotation(TextLabels labels,
Span documentSpan)
- Description copied from class:
AbstractAnnotator
- 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
- Specified by:
explainAnnotation
in class AbstractAnnotator
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Create a serialized annotator that 'requires' a particular
type of annotation in the context of a particular set of files.
- Throws:
java.io.IOException