[ 
https://issues.apache.org/jira/browse/UIMA-6153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16981906#comment-16981906
 ] 

Marshall Schor edited comment on UIMA-6153 at 11/25/19 9:43 PM:
----------------------------------------------------------------

Re: JCas setup in uima v3.  The basic answer is, yes, there's probably a 
similar overhead, although this would need to be measured.

So, you may want to not define user JCas types, if this 
one-time-at-startup-loading-of-JCas-classes is too slow.  If you don't define 
user JCas types, then the code runs using only the built-in JCas classes (like 
Annotation, and TOP), which would still need to be loaded.  For instance, all 
Annotations would end up being instantiated as variants of the Annotation type.

So you could get the same efficiencies (of not loading lots of user-defined 
types), by using the form mycas.<Annotation>selectFSs.....  


was (Author: schor):
Re: JCas setup in uima v3.  There's a 2 part answer.  The basic answer is, yes, 
there's probably a similar overhead.  

So, you may want to not define user JCas types, if this 
one-time-at-startup-loading-of-JCas-classes is too slow.  If you don't define 
user JCas types, then the code runs using only the built-in JCas classes.  For 
instance, all Annotations would end up being instantiated as variants of the 
Annotation type.

So you could get the same efficiencies (of not loading lots of user-defined 
types), by using the form mycas.<Annotation>selectFSs.....  

> select.covering should bind to AnnotationFS
> -------------------------------------------
>
>                 Key: UIMA-6153
>                 URL: https://issues.apache.org/jira/browse/UIMA-6153
>             Project: UIMA
>          Issue Type: Improvement
>          Components: UIMA
>    Affects Versions: 3.1.1SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>
> The following code does not compile because select.covering() uses TOP 
> instead of AnnotationFS as the generic type. Consequently, getBegin() and 
> getEnd() are not available on the "s" used in the filter expressions. But 
> since covering() only makes sense for annotations, binding the generic type 
> to TOP doesn't seem to make much sense:
> {{return aCas.select(getType(aCas, Sentence.class)).covering(aBegin1, 
> aBegin1)}}
> {{    .filter(s -> s.getBegin() <= aBegin1 && aBegin1 < s.getEnd())}}
> {{    .filter(s -> s.getBegin() <= aBegin2 && aBegin2 < 
> s.getEnd()).findFirst()}}
> {{    .isPresent();}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to