/** * Constructor * * @param name Pipeline name * @param config The pipeline configuration object used to build the pipeline * @param orderer The IPipelineOrderer to use to order the pipeline * @param collectionReader The collection reader * @param annotators The annotators to be ordered and used * @param consumers The consumers to be ordered and used */ public BaleenPipeline( String name, PipelineConfiguration config, IPipelineOrderer orderer, CollectionReader collectionReader, List<AnalysisEngine> annotators, List<AnalysisEngine> consumers) { this.name = name; this.config = config; this.collectionReader = collectionReader; this.annotators = orderer.orderPipeline(annotators); this.consumers = orderer.orderPipeline(consumers); }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of(Entity.class, WordToken.class, ReferenceTarget.class), ImmutableSet.of(ReferenceTarget.class)); }
/** * Cosntruct a new BaleenJob * * @param name The name of the job * @param config The job configuration * @param scheduler The scheduler (i.e. collection reader) * @param tasks List of tasks (i.e. annotators) */ public BaleenJob( String name, PipelineConfiguration config, CollectionReader scheduler, List<AnalysisEngine> tasks) { super(name, config, new NoOpOrderer(), scheduler, tasks, Collections.emptyList()); }
private void destroyAnalysisEngines() { for (AnalysisEngine ae : annotators) { AnalysisEngineActionStore.getInstance() .remove((String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID)); ae.destroy(); } for (AnalysisEngine ae : consumers) { AnalysisEngineActionStore.getInstance() .remove((String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID)); ae.destroy(); } }
private AnalysisEngineAction getAction(AnalysisEngine ae) { String uuid = (String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID); return AnalysisEngineActionStore.getInstance().get(uuid); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of( Entity.class, Sentence.class, Paragraph.class, Temporal.class, Location.class), ImmutableSet.of(Event.class)); }
private void destroyAnalysisEngines() { for (AnalysisEngine ae : annotators) { AnalysisEngineActionStore.getInstance() .remove((String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID)); ae.destroy(); } for (AnalysisEngine ae : consumers) { AnalysisEngineActionStore.getInstance() .remove((String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID)); ae.destroy(); } }
private AnalysisEngineAction getAction(AnalysisEngine ae) { String uuid = (String) ae.getConfigParameterValue(PipelineBuilder.ANNOTATOR_UUID); return AnalysisEngineActionStore.getInstance().get(uuid); } }
/** * Cosntruct a new BaleenJob * * @param name The name of the job * @param config The job configuration * @param scheduler The scheduler (i.e. collection reader) * @param tasks List of tasks (i.e. annotators) */ public BaleenJob( String name, PipelineConfiguration config, CollectionReader scheduler, List<AnalysisEngine> tasks) { super(name, config, new NoOpOrderer(), scheduler, tasks, Collections.emptyList()); }
/** * Constructor * * @param name Pipeline name * @param config The pipeline configuration object used to build the pipeline * @param orderer The IPipelineOrderer to use to order the pipeline * @param collectionReader The collection reader * @param annotators The annotators to be ordered and used * @param consumers The consumers to be ordered and used */ public BaleenPipeline( String name, PipelineConfiguration config, IPipelineOrderer orderer, CollectionReader collectionReader, List<AnalysisEngine> annotators, List<AnalysisEngine> consumers) { this.name = name; this.config = config; this.collectionReader = collectionReader; this.annotators = orderer.orderPipeline(annotators); this.consumers = orderer.orderPipeline(consumers); }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of( Entity.class, Sentence.class, Paragraph.class, Temporal.class, Location.class), ImmutableSet.of(Event.class)); }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of(), ImmutableSet.of(Sentence.class, WordToken.class, Dependency.class)); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of(), ImmutableSet.of(Sentence.class, WordToken.class, Dependency.class)); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction( ImmutableSet.of(Entity.class, WordToken.class, ReferenceTarget.class), ImmutableSet.of(ReferenceTarget.class)); }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), ImmutableSet.of(Metadata.class)); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), Collections.emptySet()); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), Collections.emptySet()); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), Collections.emptySet()); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), Collections.emptySet()); } }
@Override public AnalysisEngineAction getAction() { return new AnalysisEngineAction(Collections.emptySet(), ImmutableSet.of(Person.class)); } }