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 Mon, 29 Apr 2013 16:18:14 GMT
Hi Armin,

the equivalent to your code would be something like

TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("/some/path/AnalysisEngineDescriptorFile.xml")

However, I'd usually prefer to store my type system descriptors as a resource in my projects,
so that they end up in JARs and on the classpath. To import one type system in another, I
use "import by name" instead of "import by location".

Type systems accessible via the classpath can be made known to uimaFIT, so that you don't
actually have to load them manually. Many of the uimaFIT factory methods, like AEF.createPrimitive()
exist in a variant that doesn't take a type system. In these variants, the type system is
loaded automatically by uimaFIT. For details see [1].

Hope this helps.

Cheers,

-- Richard

[1] https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection 



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(xmlInputSource);
> 
> 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