uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Armin.Weg...@bka.bund.de>
Subject AW: uimaFit way of creating an analysis description from an XML descriptor file
Date Tue, 30 Apr 2013 08:48:22 GMT
Hi Richard,

I'm not talking about type system descriptors, but of analysis engine descriptors. I would
like to create an AnalysisEngineDescription from an analysis engine descriptor file, e. g.
like one the Textmarker Workbench created in a Textmarker Eclipse project. I'd like to add
this AnalysisEngineDescription to AggregateBuilder and run the aggregate with SimplePipeline.run().
So I can mix Textmarker ae with my own.

Cheers,
Armin
  

-----Urspr√ľngliche Nachricht-----
Von: Richard Eckart de Castilho [mailto:richard.eckart@gmail.com] 
Gesendet: Montag, 29. April 2013 18:18
An: user@uima.apache.org
Betreff: Re: uimaFit way of creating an analysis description from an XML descriptor file

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(xmlInputSo
> 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