You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by "KANO, Yoshinobu" <ka...@is.s.u-tokyo.ac.jp> on 2007/07/11 20:15:45 UTC

how to get views list of multi-views

Hi,

Are there any way to get a list of contained views (or list of
SofaIDs) in a multi-view CAS
from Java codes?
And is it possible to make sofa name mappings at runtime?
For example, before a FlowController launch next AE, can we make and
assign a new name mapping to that AE?

I read through the document but could not find any information.

Thank you,

-Yoshinobu
-- 
Yoshinobu KANO
kano@is.s.u-tokyo.ac.jp
Tsujii Laboratory, the University of Tokyo
http://www-tsujii.is.s.u-tokyo.ac.jp/

Re: how to get views list of multi-views

Posted by "KANO, Yoshinobu" <ka...@is.s.u-tokyo.ac.jp>.
Hi Eddie,

Thank you for your reply.

What I want to do is:
1. Leave Annotators as Single-Viewed
2. Assign some view to be "_InitialView" by a mapping, and pass it to the
Annotator(1.) from outside of the Annotators(1.)

The problem is that the number of views which I want to map to
"_InitialView" is not fixed.

Section 6.1.1 says that we can use an asterisk to specify various sofa
names, but I got confused about the use of periods and asterisk.
It seems that:
a. we cannot use periods for the sofa names because periods are used for the
concatinations of the mappings
b. an asterisk should be used with a period
c. but the user side always handles mapped sofa names, then no periods
should be included??

Are there any way to achieve what I mentioned (1. and 2.)?

Thanks,
-Yoshinobu

2007/7/12, Eddie Epstein <ea...@gmail.com>:
>
> Hi Kano-san,
>
> In version 2.1 one would use cas.getSofaIterator() to get an
> FSIterator for all Sofas in cas, then use cas.getView(sofa) for each
> Sofa.
>
> Version 2.2 has a new API, cas.getViewIterator(), which returns an
> Iterator for all Views in the cas.
>
> Sofa name mapping is static. If the view(s) to be processed need to be
> determined dynamically, here are two recommended approaches:
>
> A. create an FS in the CAS pointing at the desired View(s), and
> program the annotator to access the view from the FS.
> B. use a specific name prefix for the Views, and filter the Views
> based on the prefix (version 2.1) or use the new
> cas.getViewIterator(prefix) in version 2.2.
>
> Regards,
> Eddie
>
> On 7/11/07, KANO, Yoshinobu <ka...@is.s.u-tokyo.ac.jp> wrote:
> > Hi,
> >
> > Are there any way to get a list of contained views (or list of
> > SofaIDs) in a multi-view CAS
> > from Java codes?
> > And is it possible to make sofa name mappings at runtime?
> > For example, before a FlowController launch next AE, can we make and
> > assign a new name mapping to that AE?
> >
> > I read through the document but could not find any information.
> >
> > Thank you,
> >
> > -Yoshinobu
> > --
> > Yoshinobu KANO
> > kano@is.s.u-tokyo.ac.jp
> > Tsujii Laboratory, the University of Tokyo
> > http://www-tsujii.is.s.u-tokyo.ac.jp/
> >
>



-- 
Yoshinobu KANO
kano@is.s.u-tokyo.ac.jp
Tsujii Laboratory, the University of Tokyo
http://www-tsujii.is.s.u-tokyo.ac.jp/

Re: how to get views list of multi-views

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

In version 2.1 one would use cas.getSofaIterator() to get an
FSIterator for all Sofas in cas, then use cas.getView(sofa) for each
Sofa.

Version 2.2 has a new API, cas.getViewIterator(), which returns an
Iterator for all Views in the cas.

Sofa name mapping is static. If the view(s) to be processed need to be
determined dynamically, here are two recommended approaches:

A. create an FS in the CAS pointing at the desired View(s), and
program the annotator to access the view from the FS.
B. use a specific name prefix for the Views, and filter the Views
based on the prefix (version 2.1) or use the new
cas.getViewIterator(prefix) in version 2.2.

Regards,
Eddie

On 7/11/07, KANO, Yoshinobu <ka...@is.s.u-tokyo.ac.jp> wrote:
> Hi,
>
> Are there any way to get a list of contained views (or list of
> SofaIDs) in a multi-view CAS
> from Java codes?
> And is it possible to make sofa name mappings at runtime?
> For example, before a FlowController launch next AE, can we make and
> assign a new name mapping to that AE?
>
> I read through the document but could not find any information.
>
> Thank you,
>
> -Yoshinobu
> --
> Yoshinobu KANO
> kano@is.s.u-tokyo.ac.jp
> Tsujii Laboratory, the University of Tokyo
> http://www-tsujii.is.s.u-tokyo.ac.jp/
>