uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Armin.Weg...@bka.bund.de>
Subject AW: Common interface for sofa data and sofa reference
Date Tue, 15 Nov 2011 12:18:43 GMT
Hi Richard,

it works. I used

String documentText = FileUtils.reader2String(new InputStreamReader(cas.getSofaDataStream)));

Thanks

Armin

-----Urspr√ľngliche Nachricht-----
Von: Richard Eckart de Castilho [mailto:eckartde@tk.informatik.tu-darmstadt.de] 
Gesendet: Sonntag, 13. November 2011 16:38
An: user@uima.apache.org
Betreff: Re: Common interface for sofa data and sofa reference

Hi Armin,

I didn't try it, but I believe CAS.getSofaDataStream() should work for you. But I believe
the getCoveredText() method will only work for text that is included with the CAS.

-- Richard

Am 11.11.2011 um 07:59 schrieb Armin.Wegner@bka.bund.de:

> 
> Hi,
> 
> A text sofa can be included in a CAS or it can be referenced by an URI.
> Writing an annotator, I do not want to distinguish between these two 
> ways. I would like to have a common interface for both. Does it exist?
> Or do I have to write two versions of each annotator? For example, I'd 
> like to have one method to get the document text, regardless whether 
> it is included or referenced.
> 
> Greetings,
> 
> Armin


--
-------------------------------------------------------------------
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab 
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