uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <eckar...@tk.informatik.tu-darmstadt.de>
Subject Re: AW: Extracting a single view from a CAS
Date Thu, 22 Dec 2011 13:40:00 GMT
Hi Armin,

die XWriter uses the default UIMA XMI and XCAS serializers. These are meant to persist a complete
CAS. I had a brief look at them and it seems that they are not meant to work on a single view
(there are several calls to getBaseCas() in them). However, we could easily add an option
to write only selected views in the uimaFIT CasDumpWriter.

Cheers,

-- Richard

Am 22.12.2011 um 13:40 schrieb Armin.Wegner@bka.bund.de:

> Hi Torsten,
> 
> I got the idea. The easiest way would be to use org.uimafit.component.xwriter.XWriter
as a kind of visualizer. But that does not work. XWriter does always write the whole CAS instead
of the mapped view. I tried
> 
> CollectionReaderDescription reader = CollectionReaderFactory...
> AggregateBuilder builder = new AggregateBuilder();
> AnalysisEngineDescription writer = AnalysisEngineFactory.createPrimitiveDescription(XWriter.class,
XWriter.PARAM_OUTPUT_DIRECTORY_NAME, outputDirectoryName);
> builder.add(writer, CAS.NAME_DEFAULT_SOFA, "viewName");  // viewName is the name of the
view that should be serialized
> SimplePipeline.runPipeline(reader, builder.createAggregateDescription());
> 
> Regards,
> 
> Armin

-- 
------------------------------------------------------------------- 
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab (UKP-TUD) 
FB 20 Computer Science Department      
Technische Universit├Ąt Darmstadt 
Hochschulstr. 10, D-64289 Darmstadt, Germany 
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckartde@tk.informatik.tu-darmstadt.de 
www.ukp.tu-darmstadt.de 
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
------------------------------------------------------------------- 






Mime
View raw message