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: Getting the effective type system
Date Mon, 29 Apr 2013 16:35:48 GMT
Hi,

if you use the automatic type system detection feature of uimaFIT [1], you can get the full
automatically detected type system by calling TypeSystemDescriptionFactory.createTypeSystemDescription(),
even without an aggregate. 

Or you just create it from the AnalysisEngineDescription you get from the AggregateBuilder.
I have to admit, that I didn't try if that really gets the aggregated type system (after resolving,
see below).

For both approaches, mind to resolve the imports:

AnalysisEngineDescription desc = …
ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
desc.resolveImports(resMgr);
desc.getAnalysisEngineMetaData().getTypeSystem();

Finally, you can could create an AnalysisEngine from your aggregate description, create a
CAS from it and use TypeSystemUtil.typeSystem2TypeSystemDescription(aJCas.getTypeSystem()).toXML(typeOS).
This also works in a consumer (cf. DKPro Core XMIWriter [2]).

Cheers,

-- Richard

[1] https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection
[2] https://dkpro-core-asl.googlecode.com/svn/de.tudarmstadt.ukp.dkpro.core-asl/trunk/de.tudarmstadt.ukp.dkpro.core.io.xmi-asl/src/main/java/de/tudarmstadt/ukp/dkpro/core/io/xmi/XmiWriter.java

Am 29.04.2013 um 17:10 schrieb <Armin.Wegner@bka.bund.de>:

> Hi!
> 
> Using org.uimafit.factory.AggregateBuilder you can aggregate analysis engines with different
type systems. Is there any way to serialize the effective type system from such an aggregate
or from the CAS it is using?
> 
> Thanks,
> Armin
> 


Mime
View raw message