/** * Get an {@link AnalysisEngine} from an XML descriptor file and a set of configuration * parameters. * * @param descriptorPath * The path to the XML descriptor file. * @param configurationData * Any additional configuration parameters to be set. These should be supplied as (name, * value) pairs, so there should always be an even number of parameters. * @return The {@link AnalysisEngine} created from the XML descriptor and the configuration * parameters. * @throws IOException * if an I/O error occurs * @throws InvalidXMLException * if the input XML is not valid or does not specify a valid {@link ResourceSpecifier} * @throws ResourceInitializationException * if a failure occurred during production of the resource. * @see <a href="package-summary.html#InstancesVsDescriptors">Why are descriptors better than * component instances?</a> * @deprecated use {@link #createEngineFromPath(String, Object...)} */ @Deprecated public static AnalysisEngine createAnalysisEngineFromPath(String descriptorPath, Object... configurationData) throws InvalidXMLException, IOException, ResourceInitializationException { return createEngineFromPath(descriptorPath, configurationData); }
public BagOfAnnotationsGenerator(String inputDir, String outputDir, String aePath) throws UIMAException, IOException { reader = CollectionReaderFactory .createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR, inputDir ); this.ae = AnalysisEngineFactory.createEngineFromPath( aePath == null ? defaultAEPath : aePath ); this.outputDir = outputDir; this.classOfT = getClassOfT(); }
public BagOfAnnotationsGenerator(String inputDir, String outputDir, String aePath) throws UIMAException, IOException { reader = CollectionReaderFactory .createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR, inputDir ); this.ae = AnalysisEngineFactory.createEngineFromPath( aePath == null ? defaultAEPath : aePath ); this.outputDir = outputDir; this.classOfT = getClassOfT(); }
AnalysisEngine ae = AnalysisEngineFactory.createEngineFromPath( "desc/analysis_engine/ODIESvmVectorCreator.xml" );
AnalysisEngine ae = AnalysisEngineFactory.createEngineFromPath( "desc/analysis_engine/ODIESvmVectorCreator.xml" );
public static void main(String[] args) throws UIMAException, IOException { String sampleSentence = "He still is not able to work because of severe pain involving his wrists."; JCas jCas = JCasFactory.createJCas(); jCas.setDocumentText(sampleSentence); AnalysisEngine relationExtractor = AnalysisEngineFactory.createEngineFromPath( "desc/analysis_engine/RelationExtractorAggregate.xml"); AnalysisEngine relationConsumer = AnalysisEngineFactory.createEngine( RelationExtractorConsumer.class); SimplePipeline.runPipeline(jCas, relationExtractor, relationConsumer); } }
public static void main(String[] args) throws UIMAException, IOException { String sampleSentence = "He still is not able to work because of severe pain involving his wrists."; JCas jCas = JCasFactory.createJCas(); jCas.setDocumentText(sampleSentence); AnalysisEngine relationExtractor = AnalysisEngineFactory.createEngineFromPath( "desc/analysis_engine/RelationExtractorAggregate.xml"); AnalysisEngine relationConsumer = AnalysisEngineFactory.createEngine( RelationExtractorConsumer.class); SimplePipeline.runPipeline(jCas, relationExtractor, relationConsumer); } }