de.citec.scie.AnnotatorPipeline Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scie-core Show documentation
Show all versions of scie-core Show documentation
Contains the SCIE main application and the CLI interface.
This project integrates the named entity recognition (NER), the
PDF import and the classification and interfaces with the UIMA framework.
The command line interface can be used to produce a set of UIMA XCAS files.
The newest version!
/*
* SCIE -- Spinal Cord Injury Information Extraction
* Copyright (C) 2013, 2014
* Raphael Dickfelder, Jan Göpfert, Benjamin Paaßen, Andreas Stöckel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package de.citec.scie;
import java.util.ArrayList;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
import org.apache.uima.jcas.JCas;
/**
* This is a simple pipeline class modelling the iterative application of
* different annotators.
*
* @author Benjamin Paassen - [email protected]
*/
public class AnnotatorPipeline {
private final ArrayList annotators = new ArrayList<>();
public AnnotatorPipeline() {
}
public ArrayList getAnnotators() {
return annotators;
}
/**
* Runs all annotators stored in this pipeline on the given input JCas
* instance. The results are stored in the given JCas instance as well.
*
* @param input a JCas instance.
* @throws AnalysisEngineProcessException may be thrown by an annotator.
*/
public void process(JCas input) throws AnalysisEngineProcessException {
for (final JCasAnnotator_ImplBase annotator : annotators) {
annotator.process(input);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy