use of com.graphaware.nlp.workflow.input.WorkflowInputEndOfQueueEntry in project neo4j-nlp by graphaware.
the class WorkflowTextProcessor method handle.
@Override
public void handle(WorkflowInputEntry entry) {
if (entry instanceof WorkflowInputEndOfQueueEntry) {
super.checkAndHandle(new WorkflowProcessorEndOfQueueEntry());
return;
}
if (isValid()) {
AnnotatedText annotateText = NLPManager.getInstance().getTextProcessorsManager().annotate(entry.getText(), getConfiguration().getPipeline());
super.checkAndHandle(new WorkflowProcessorOutputEntry(annotateText, entry.getId()));
} else {
LOG.warn("The Processor " + this.getName() + " is in an invalid state");
return;
}
}
Aggregations