You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Shahim Essaid <sh...@essaid.com> on 2012/08/13 19:59:33 UTC

A shared object graph between various views/sofas

Hi All,

Is there a way for creating a single arbitrary object graph (of
subtypes of Top) that is accessible from various CAS views? I have a
possible use-case where I would like to reconstruct the "domain,
world, situation, etc." that the various sofas are about. In this
use-case, I would add annotations to specific sofas and indexes as
usual but I would also like to add objects to this single shared
object graph and relate the annotations and object to each other.

I have not tried this yet but it might be possible to add an "IsAbout"
annotation that spans the whole sofa and one of its features is a
"situation" feature to a "Situation" object and then make sure that
this situation object is also referred to from any newly created sofas
and their corresponding "IsAbout" annotations.  Would this work?  Is
there a better way for accomplishing this?

Thank you,
Shahim

Re: A shared object graph between various views/sofas

Posted by Eddie Epstein <ea...@gmail.com>.
There is no single index across all views.
Eddie

On Tue, Aug 14, 2012 at 12:36 PM, Shahim Essaid <sh...@essaid.com> wrote:
> Yes, the idea of a global view is probably the best option.  I
> initially thought that the
> getIndexRepository().getAllIndexedFS(SomeType)  would allow me to
> access type instances independent of views (from the heaps you
> referred to) but that didn't work.
>
> Is there any public API access for getting an iterator over instances
> of a type directly from the heaps regardless of the current view? It
> seems that this type of access could be useful since a CAS is supposed
> to have something in common across the different views and it wouldn't
> be too inappropriate to allow for view independent type instances when
> needed.
>
> Shahim
>
>
> On Tue, Aug 14, 2012 at 6:53 AM, Eddie Epstein <ea...@gmail.com> wrote:
>> A View, basically, is just an index and a sofa. All FS are stored
>> in the common CAS "heaps".
>>
>> The only mechanism for passing results from annotator-a to
>> annotator-b is by adding FS to an index. Annotators can
>> be view-unaware, in which case sofa-mapping is setup
>> to pass the correct View to the annotator. Or annotators can
>> be view-aware and they must have logic to know which views
>> to look for.
>>
>> Given that views are application specific, an app can create
>> a "global" view to index stuff.
>>
>> Eddie
>>
>> On Mon, Aug 13, 2012 at 4:08 PM, Shahim Essaid <sh...@essaid.com> wrote:
>>> Thank you Eddie.  So I can index a non-AnnotationBase FS in any view
>>> but the indexes are still view specific, correct?
>>>
>>> If "annotator-a" in view "view-a" creates a FS and there is a down
>>> stream "annotator-b" that operates in "view-b" and it needs to check
>>> for the existence of the same FS, how should "annotator-a" store it
>>> and how should "annotator-b" find it without them being aware of each
>>> others' views and indexes?  Is there a global place (global index?) to
>>> store FS objects in a CAS if the indexes are view specific?
>>>
>>> Thanks,
>>> Shahim
>>>
>>>
>>>
>>> On Mon, Aug 13, 2012 at 12:07 PM, Eddie Epstein <ea...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> All feature structures in a CAS are accessible from any view.
>>>> That is, an FS-reference can be to any FS in the CAS.
>>>> The only restriction is that an annotation FS can only be indexed
>>>> in the view containing the sofa referenced by the annotation.
>>>>
>>>> An FS type that is not derived from any annotation type
>>>> can be indexed in multiple views. So a "global graph" type
>>>> could be indexed in every view.
>>>>
>>>> Not sure which aspect of your question this answers, hopefully
>>>> something :)
>>>>
>>>> Eddie
>>>>
>>>> On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid <sh...@essaid.com> wrote:
>>>>> Hi All,
>>>>>
>>>>> Is there a way for creating a single arbitrary object graph (of
>>>>> subtypes of Top) that is accessible from various CAS views? I have a
>>>>> possible use-case where I would like to reconstruct the "domain,
>>>>> world, situation, etc." that the various sofas are about. In this
>>>>> use-case, I would add annotations to specific sofas and indexes as
>>>>> usual but I would also like to add objects to this single shared
>>>>> object graph and relate the annotations and object to each other.
>>>>>
>>>>> I have not tried this yet but it might be possible to add an "IsAbout"
>>>>> annotation that spans the whole sofa and one of its features is a
>>>>> "situation" feature to a "Situation" object and then make sure that
>>>>> this situation object is also referred to from any newly created sofas
>>>>> and their corresponding "IsAbout" annotations.  Would this work?  Is
>>>>> there a better way for accomplishing this?
>>>>>
>>>>> Thank you,
>>>>> Shahim

Re: A shared object graph between various views/sofas

Posted by Shahim Essaid <sh...@essaid.com>.
Yes, the idea of a global view is probably the best option.  I
initially thought that the
getIndexRepository().getAllIndexedFS(SomeType)  would allow me to
access type instances independent of views (from the heaps you
referred to) but that didn't work.

Is there any public API access for getting an iterator over instances
of a type directly from the heaps regardless of the current view? It
seems that this type of access could be useful since a CAS is supposed
to have something in common across the different views and it wouldn't
be too inappropriate to allow for view independent type instances when
needed.

Shahim


On Tue, Aug 14, 2012 at 6:53 AM, Eddie Epstein <ea...@gmail.com> wrote:
> A View, basically, is just an index and a sofa. All FS are stored
> in the common CAS "heaps".
>
> The only mechanism for passing results from annotator-a to
> annotator-b is by adding FS to an index. Annotators can
> be view-unaware, in which case sofa-mapping is setup
> to pass the correct View to the annotator. Or annotators can
> be view-aware and they must have logic to know which views
> to look for.
>
> Given that views are application specific, an app can create
> a "global" view to index stuff.
>
> Eddie
>
> On Mon, Aug 13, 2012 at 4:08 PM, Shahim Essaid <sh...@essaid.com> wrote:
>> Thank you Eddie.  So I can index a non-AnnotationBase FS in any view
>> but the indexes are still view specific, correct?
>>
>> If "annotator-a" in view "view-a" creates a FS and there is a down
>> stream "annotator-b" that operates in "view-b" and it needs to check
>> for the existence of the same FS, how should "annotator-a" store it
>> and how should "annotator-b" find it without them being aware of each
>> others' views and indexes?  Is there a global place (global index?) to
>> store FS objects in a CAS if the indexes are view specific?
>>
>> Thanks,
>> Shahim
>>
>>
>>
>> On Mon, Aug 13, 2012 at 12:07 PM, Eddie Epstein <ea...@gmail.com> wrote:
>>> Hi,
>>>
>>> All feature structures in a CAS are accessible from any view.
>>> That is, an FS-reference can be to any FS in the CAS.
>>> The only restriction is that an annotation FS can only be indexed
>>> in the view containing the sofa referenced by the annotation.
>>>
>>> An FS type that is not derived from any annotation type
>>> can be indexed in multiple views. So a "global graph" type
>>> could be indexed in every view.
>>>
>>> Not sure which aspect of your question this answers, hopefully
>>> something :)
>>>
>>> Eddie
>>>
>>> On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid <sh...@essaid.com> wrote:
>>>> Hi All,
>>>>
>>>> Is there a way for creating a single arbitrary object graph (of
>>>> subtypes of Top) that is accessible from various CAS views? I have a
>>>> possible use-case where I would like to reconstruct the "domain,
>>>> world, situation, etc." that the various sofas are about. In this
>>>> use-case, I would add annotations to specific sofas and indexes as
>>>> usual but I would also like to add objects to this single shared
>>>> object graph and relate the annotations and object to each other.
>>>>
>>>> I have not tried this yet but it might be possible to add an "IsAbout"
>>>> annotation that spans the whole sofa and one of its features is a
>>>> "situation" feature to a "Situation" object and then make sure that
>>>> this situation object is also referred to from any newly created sofas
>>>> and their corresponding "IsAbout" annotations.  Would this work?  Is
>>>> there a better way for accomplishing this?
>>>>
>>>> Thank you,
>>>> Shahim

Re: A shared object graph between various views/sofas

Posted by Eddie Epstein <ea...@gmail.com>.
A View, basically, is just an index and a sofa. All FS are stored
in the common CAS "heaps".

The only mechanism for passing results from annotator-a to
annotator-b is by adding FS to an index. Annotators can
be view-unaware, in which case sofa-mapping is setup
to pass the correct View to the annotator. Or annotators can
be view-aware and they must have logic to know which views
to look for.

Given that views are application specific, an app can create
a "global" view to index stuff.

Eddie

On Mon, Aug 13, 2012 at 4:08 PM, Shahim Essaid <sh...@essaid.com> wrote:
> Thank you Eddie.  So I can index a non-AnnotationBase FS in any view
> but the indexes are still view specific, correct?
>
> If "annotator-a" in view "view-a" creates a FS and there is a down
> stream "annotator-b" that operates in "view-b" and it needs to check
> for the existence of the same FS, how should "annotator-a" store it
> and how should "annotator-b" find it without them being aware of each
> others' views and indexes?  Is there a global place (global index?) to
> store FS objects in a CAS if the indexes are view specific?
>
> Thanks,
> Shahim
>
>
>
> On Mon, Aug 13, 2012 at 12:07 PM, Eddie Epstein <ea...@gmail.com> wrote:
>> Hi,
>>
>> All feature structures in a CAS are accessible from any view.
>> That is, an FS-reference can be to any FS in the CAS.
>> The only restriction is that an annotation FS can only be indexed
>> in the view containing the sofa referenced by the annotation.
>>
>> An FS type that is not derived from any annotation type
>> can be indexed in multiple views. So a "global graph" type
>> could be indexed in every view.
>>
>> Not sure which aspect of your question this answers, hopefully
>> something :)
>>
>> Eddie
>>
>> On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid <sh...@essaid.com> wrote:
>>> Hi All,
>>>
>>> Is there a way for creating a single arbitrary object graph (of
>>> subtypes of Top) that is accessible from various CAS views? I have a
>>> possible use-case where I would like to reconstruct the "domain,
>>> world, situation, etc." that the various sofas are about. In this
>>> use-case, I would add annotations to specific sofas and indexes as
>>> usual but I would also like to add objects to this single shared
>>> object graph and relate the annotations and object to each other.
>>>
>>> I have not tried this yet but it might be possible to add an "IsAbout"
>>> annotation that spans the whole sofa and one of its features is a
>>> "situation" feature to a "Situation" object and then make sure that
>>> this situation object is also referred to from any newly created sofas
>>> and their corresponding "IsAbout" annotations.  Would this work?  Is
>>> there a better way for accomplishing this?
>>>
>>> Thank you,
>>> Shahim

Re: A shared object graph between various views/sofas

Posted by Shahim Essaid <sh...@essaid.com>.
Thank you Eddie.  So I can index a non-AnnotationBase FS in any view
but the indexes are still view specific, correct?

If "annotator-a" in view "view-a" creates a FS and there is a down
stream "annotator-b" that operates in "view-b" and it needs to check
for the existence of the same FS, how should "annotator-a" store it
and how should "annotator-b" find it without them being aware of each
others' views and indexes?  Is there a global place (global index?) to
store FS objects in a CAS if the indexes are view specific?

Thanks,
Shahim



On Mon, Aug 13, 2012 at 12:07 PM, Eddie Epstein <ea...@gmail.com> wrote:
> Hi,
>
> All feature structures in a CAS are accessible from any view.
> That is, an FS-reference can be to any FS in the CAS.
> The only restriction is that an annotation FS can only be indexed
> in the view containing the sofa referenced by the annotation.
>
> An FS type that is not derived from any annotation type
> can be indexed in multiple views. So a "global graph" type
> could be indexed in every view.
>
> Not sure which aspect of your question this answers, hopefully
> something :)
>
> Eddie
>
> On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid <sh...@essaid.com> wrote:
>> Hi All,
>>
>> Is there a way for creating a single arbitrary object graph (of
>> subtypes of Top) that is accessible from various CAS views? I have a
>> possible use-case where I would like to reconstruct the "domain,
>> world, situation, etc." that the various sofas are about. In this
>> use-case, I would add annotations to specific sofas and indexes as
>> usual but I would also like to add objects to this single shared
>> object graph and relate the annotations and object to each other.
>>
>> I have not tried this yet but it might be possible to add an "IsAbout"
>> annotation that spans the whole sofa and one of its features is a
>> "situation" feature to a "Situation" object and then make sure that
>> this situation object is also referred to from any newly created sofas
>> and their corresponding "IsAbout" annotations.  Would this work?  Is
>> there a better way for accomplishing this?
>>
>> Thank you,
>> Shahim

Re: A shared object graph between various views/sofas

Posted by Eddie Epstein <ea...@gmail.com>.
Hi,

All feature structures in a CAS are accessible from any view.
That is, an FS-reference can be to any FS in the CAS.
The only restriction is that an annotation FS can only be indexed
in the view containing the sofa referenced by the annotation.

An FS type that is not derived from any annotation type
can be indexed in multiple views. So a "global graph" type
could be indexed in every view.

Not sure which aspect of your question this answers, hopefully
something :)

Eddie

On Mon, Aug 13, 2012 at 1:59 PM, Shahim Essaid <sh...@essaid.com> wrote:
> Hi All,
>
> Is there a way for creating a single arbitrary object graph (of
> subtypes of Top) that is accessible from various CAS views? I have a
> possible use-case where I would like to reconstruct the "domain,
> world, situation, etc." that the various sofas are about. In this
> use-case, I would add annotations to specific sofas and indexes as
> usual but I would also like to add objects to this single shared
> object graph and relate the annotations and object to each other.
>
> I have not tried this yet but it might be possible to add an "IsAbout"
> annotation that spans the whole sofa and one of its features is a
> "situation" feature to a "Situation" object and then make sure that
> this situation object is also referred to from any newly created sofas
> and their corresponding "IsAbout" annotations.  Would this work?  Is
> there a better way for accomplishing this?
>
> Thank you,
> Shahim