uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <richard.eck...@gmail.com>
Subject Re: uimaFit way of creating an analysis description from an XML descriptor file
Date Tue, 30 Apr 2013 09:25:00 GMT
Hi Armin,

> The file is in the file system. But I don't want to create an AnalysisEngine with AnalysisEngineFactory.createAnalysisEngineFromPath().
I'd rather like to have an AnalysisEngineDescription. But there is not method createAnalysisEngineDescriptionFromPath().

Right, there is none. We could add one for sake of completeness. I suppose we never needed/missed
that so far. Ok, so the anwer to the original question is: there is currently no uimaFIT-way
for doing this.

> Is there an easy way to get an AnalysisEngineDescription from an AnalysisEngine?

Nope. 

Cheers,

-- Richard

> Cheers,
> Armin
> 
>> Am 29.04.2013 um 17:04 schrieb <Armin.Wegner@bka.bund.de>:
>> 
>>> Hi!
>>> 
>>> In classical UIMA you use following code to create an AnalysisEngineDescription
from an XML descriptor file.
>>> 
>>> final Path descriptorFilePath = Paths.get("/some/path/", 
>>> "AnalysisEngineDescriptorFile.xml");
>>> final XMLInputSource xmlInputSource = new 
>>> XMLInputSource(descriptorFilePath.toFile());
>>> final AnalysisEngineDescription analysisEngineDescription = 
>>> UIMAFramework.getXMLParser().parseAnalysisEngineDescription(xmlInputS
>>> o
>>> urce);
>>> 
>>> Now you can use analysisEngineDescription with org.uimafit.factory.AggregateBuilder
to create an aggregate analysis engine and run the pipeline with SimpePipeline.run().
>>> 
>>> How is the uimaFit way to do this?
>>> 
>>> Cheers,
>>> 
>>> Armin


Mime
View raw message