Package com.basistech.rosette.dm.util
Class ComposingAnnotator
java.lang.Object
com.basistech.rosette.dm.util.ComposingAnnotator
- All Implemented Interfaces:
Annotator
An annotator that applies a series of annotators.
-
Constructor Summary
ConstructorsConstructorDescriptionComposingAnnotator
(List<Annotator> annotators) Construct a composing annotator from a list of annotators. -
Method Summary
Modifier and TypeMethodDescriptionannotate
(AnnotatedText input) Annotates an existing text object with additional attributes.annotate
(CharSequence input) Apply the first annotator to the plain character sequence, and then chain the results of that annotator through the remaining annotators.
-
Constructor Details
-
ComposingAnnotator
Construct a composing annotator from a list of annotators. Input is passed to the first annotator. The results of the first annotator are passed to the second annotator, etc, and the last annotator's results are returned.- Parameters:
annotators
- the annotators.
-
-
Method Details
-
annotate
Apply the first annotator to the plain character sequence, and then chain the results of that annotator through the remaining annotators. -
annotate
Description copied from interface:Annotator
Annotates an existing text object with additional attributes. For example, an entity annotator may take the output of a base linguistics annotator (which has token annotations) and add additional entities attributes.
-