Package com.gengoai.hermes
Class AnnotationPipeline
- java.lang.Object
-
- com.gengoai.hermes.AnnotationPipeline
-
- All Implemented Interfaces:
Serializable
public class AnnotationPipeline extends Object implements Serializable
Helper class for determining the correct sequence of annotators to apply on a Document in order for to satisfy the given AnnotatableType.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotationPipeline(@NonNull AnnotatableType... types)
Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.AnnotationPipeline(@NonNull Collection<? extends AnnotatableType> types)
Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
annotate(@NonNull Document document)
Annotates a document to fulfill the desired set of annotatable typesboolean
requiresUpdate()
-
-
-
Constructor Detail
-
AnnotationPipeline
public AnnotationPipeline(@NonNull @NonNull AnnotatableType... types)
Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.- Parameters:
types
- the AnnotatableType we want to the document to have
-
AnnotationPipeline
public AnnotationPipeline(@NonNull @NonNull Collection<? extends AnnotatableType> types)
Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.- Parameters:
types
- the AnnotatableType we want to the document to have
-
-
Method Detail
-
annotate
public boolean annotate(@NonNull @NonNull Document document)
Annotates a document to fulfill the desired set of annotatable types- Parameters:
document
- the document to annotate- Returns:
- true if the document was modified, false otherwise
-
requiresUpdate
public boolean requiresUpdate()
- Returns:
- true if the Pipeline has AnnotatableType to annotate, False if not
-
-