Closed GoogleCodeExporter closed 8 years ago
selectCovered(JCas, Class<T>, int, int) is just the same as iterate(JCas,
Class<T>, int, int), will only implement select.
selectCovering(JCas, Class<T>, int, int) this is tricky. The ContainmentIndex approach won't work here.
Original comment by richard.eckart
on 16 Mar 2011 at 10:23
I think selectCovered(JCas, Class<T>, int, int) is all I really need most of
the time, so if selectCovering is tricky, skip that one and we can open another
issue if we ever really need it again.
Original comment by steven.b...@gmail.com
on 16 Mar 2011 at 10:53
I have implemented selectCovered(JCas, Class<T>, int, int) - this is slower
than when searching within an actual annotation instance - I do not recommend
using it. There is a warning in the JavaDoc.
I have also implemented selectCovering(JCas, Class<T>, int, int). This is
really slow, because it requires a full CAS scan. It's there because you
requested it, but I cannot recommend anybody to use that. I can't imagine how
to implement this with a better performance. I strongly recommend to use the
ContainmentIndex or its successor once that is implemented.
Original comment by richard.eckart
on 16 Mar 2011 at 10:55
Original comment by richard.eckart
on 16 Mar 2011 at 10:55
For selectCovered(JCas, Class<T>, int, int), if it's currently slower than
searching with an actual annotation instance, wouldn't it just be better to
have it call:
selectCovered(jCas, cls, new Annotation(jCas, int, int))
?
Original comment by steven.b...@gmail.com
on 17 Mar 2011 at 6:54
I am not sure calling new Annotation(jcas) already takes up memory in the CAS,
that is why I didn't implement it like that. I am also not sure if the
Annotation would need to be added to the indexes for that to work.
Original comment by richard.eckart
on 17 Mar 2011 at 1:26
I don't know about the memory, but you don't need to add it to the indexes - it
works fine without it in our AnnotationRetrieval code.
Original comment by steven.b...@gmail.com
on 18 Mar 2011 at 9:16
Original comment by richard.eckart
on 7 Apr 2011 at 12:12
Original issue reported on code.google.com by
richard.eckart
on 16 Mar 2011 at 8:22