You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Alexander Klenner <al...@scai.fraunhofer.de> on 2011/08/11 10:23:41 UTC

CASes being images

Hi folks,

I have been playing around with UIMA for some time now and I came to a point were I cannot find any supporting information anymore, it is CASes that are different from plain text. Is there any example of a CAS being a picture or video? All the standard CAS functionalities such as .getDocumentText() or even the `begin` and `end` markers for annotations that are dependend on characters in text won't make sense anymore. Or is it that I have to see the CAS as a textual representation of a picture? Maybe someone can point me in the correct direction of thinking here. Examples, if existing, would be great of course.

Thanks a lot and best regards,

Alex





--
Dipl. Bioinformatiker Alexander G. Klenner
Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven, D-53754 Sankt Augustin
Tel.: +49 - 2241 - 14 - 2736
E-mail: alexander.garvin.klenner@scai.fraunhofer.de
Internet: http://www.scai.fraunhofer.de



Re: CASes being images

Posted by Burn Lewis <bu...@gmail.com>.
The data can be inside the CAS (and hence serialized) if you use a
SofaDataArray.  We chose not to since the audio files were large.  You can
also use getSofaDataStream to access it whether internal or external.  But
either way, as Richard said, you'll have to create your own equivalent of
getCoveredText.

~Burn

Re: CASes being images

Posted by Alexander Klenner <al...@scai.fraunhofer.de>.
Again thanks for the answers and ideas. So, if I get this right, any image or audio (or more general: binary) information  will only be referenced by the CAS and is not really meant to be 'inside' it (or inside the memory). Annotators get the location of the object from the CAS and do some BlackBox stuff with it. I wonder what happens if such a CAS is serialized but I'll just try this now. 

Thanks for the example Burn, I'll have a look at this too.

cheers,

Alex

--
Dipl. Bioinformatiker Alexander G. Klenner
Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
Schloss Birlinghoven, D-53754 Sankt Augustin
Tel.: +49 - 2241 - 14 - 2736
E-mail: alexander.garvin.klenner@scai.fraunhofer.de
Internet: http://www.scai.fraunhofer.de


----- Ursprüngliche Mail -----
Von: "Burn Lewis" <bu...@gmail.com>
An: user@uima.apache.org
Gesendet: Donnerstag, 11. August 2011 15:14:05
Betreff: Re: CASes being images

There is a typesystem in the GALE Multi-Modal Example in the Sandbox that
has been used for processing audio.  We created an AudioSpan type whose
begin & end are  seconds (float) from the start of a block of audio that was
referenced via the SofaDataUri.  Speech recognizers annotated words on an
AudioSpan in the audio view, and the words were later combined into a text
string in another view for further textual processing.

~Burn

Re: CASes being images

Posted by Burn Lewis <bu...@gmail.com>.
There is a typesystem in the GALE Multi-Modal Example in the Sandbox that
has been used for processing audio.  We created an AudioSpan type whose
begin & end are  seconds (float) from the start of a block of audio that was
referenced via the SofaDataUri.  Speech recognizers annotated words on an
AudioSpan in the audio view, and the words were later combined into a text
string in another view for further textual processing.

~Burn

Re: CASes being images

Posted by Eddie Epstein <ea...@gmail.com>.
> One addition. Your "ImageAnnotation" type would inherit from TOP, not from Annotation or AnnotatioBase.

Assuming that ImageAnnotation is a reference to a region in the image,
it *would* want to inherit from AnnotationBase.

Eddie

Re: CASes being images

Posted by Richard Eckart de Castilho <ec...@tk.informatik.tu-darmstadt.de>.
One addition. Your "ImageAnnotation" type would inherit from TOP, not from Annotation or AnnotatioBase.

Cheers,

Richard

Am 11.08.2011 um 13:43 schrieb Richard Eckart de Castilho:

> Hello Alex,
> 
> I haven't done this yet, but I still might be able to provide some starters:
> 
> The methods you have to deal with are CAS.setSofaDataArray() or CAS.setSofaDataUri() and CAS.getSofaDataArray() or CAS.getSofaDataStream(). With these methods you can add internal or external binary information to the CAS. Depending on the format of your binary data, you will have to define your own annotation types, e.g. an ImageAnnotation that has features for top, left, bottom, right. You may then add custom methods to the generated JCas type e.g. to extract a part of the image from the binary data and return it in a convenient format - this would be your custom equivalent of a getCoveredText() from the Annotation type. If you are using video or audio, your features and extraction functions would be different of course.
> 
> Cheers,
> 
> Richard
> 
> Am 11.08.2011 um 10:23 schrieb Alexander Klenner:
> 
>> Hi folks,
>> 
>> I have been playing around with UIMA for some time now and I came to a point were I cannot find any supporting information anymore, it is CASes that are different from plain text. Is there any example of a CAS being a picture or video? All the standard CAS functionalities such as .getDocumentText() or even the `begin` and `end` markers for annotations that are dependend on characters in text won't make sense anymore. Or is it that I have to see the CAS as a textual representation of a picture? Maybe someone can point me in the correct direction of thinking here. Examples, if existing, would be great of course.
>> 
>> Thanks a lot and best regards,
>> 
>> Alex
> 

Richard Eckart de Castilho

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





Re: CASes being images

Posted by Richard Eckart de Castilho <ec...@tk.informatik.tu-darmstadt.de>.
Hello Alex,

I haven't done this yet, but I still might be able to provide some starters:

The methods you have to deal with are CAS.setSofaDataArray() or CAS.setSofaDataUri() and CAS.getSofaDataArray() or CAS.getSofaDataStream(). With these methods you can add internal or external binary information to the CAS. Depending on the format of your binary data, you will have to define your own annotation types, e.g. an ImageAnnotation that has features for top, left, bottom, right. You may then add custom methods to the generated JCas type e.g. to extract a part of the image from the binary data and return it in a convenient format - this would be your custom equivalent of a getCoveredText() from the Annotation type. If you are using video or audio, your features and extraction functions would be different of course.

Cheers,

Richard

Am 11.08.2011 um 10:23 schrieb Alexander Klenner:

> Hi folks,
> 
> I have been playing around with UIMA for some time now and I came to a point were I cannot find any supporting information anymore, it is CASes that are different from plain text. Is there any example of a CAS being a picture or video? All the standard CAS functionalities such as .getDocumentText() or even the `begin` and `end` markers for annotations that are dependend on characters in text won't make sense anymore. Or is it that I have to see the CAS as a textual representation of a picture? Maybe someone can point me in the correct direction of thinking here. Examples, if existing, would be great of course.
> 
> Thanks a lot and best regards,
> 
> Alex
> 
> 
> 
> 
> 
> --
> Dipl. Bioinformatiker Alexander G. Klenner
> Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
> Schloss Birlinghoven, D-53754 Sankt Augustin
> Tel.: +49 - 2241 - 14 - 2736
> E-mail: alexander.garvin.klenner@scai.fraunhofer.de
> Internet: http://www.scai.fraunhofer.de
> 
> 

Richard Eckart de Castilho

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