Open GoogleCodeExporter opened 9 years ago
It may be wise to have these methods as a JCas variant in JCasUtil and as a
pure CAS variant in CasUtil - cf. JCasUtil/CasUtil.selectPreceeding().
Original comment by richard.eckart
on 3 Jan 2011 at 4:20
Original comment by pvogren@gmail.com
on 4 Jan 2011 at 12:14
I've briefly looked at AnnotationRetrieval, but I didn't immediately see if
there is still something there that is not yet covered by JCasUtil and CasUtil.
Is there anything in particular that you would like to migrate or have
re-implemented in uimaFIT?
Original comment by richard.eckart
on 16 Mar 2011 at 11:57
Some of those methods aren't used, but of the ones that are, it looks like
we're still missing the methods for selecting annotations that exactly match a
span, and for selecting the first and last annotations from a window:
getAnnotations(..., true) -> selectMatching(jCas, Class<T>, Annotation)
getAnnotations(..., true) -> selectMatching(jCas, Class<T>, int, int)
getMatchingAnnotation -> selectSingleMatching(jCas, Class<T>, Annotation)
getMatchingAnnotation -> selectSingleMatching(jCas, Class<T>, int, int)
getFirstAnnotation -> selectFirstCovered(jCas, Class<T>, Annotation)
getLastAnnotation -> selectLastCovered(jCas, Class<T>, Annotation)
For the selectSingleMatching methods, they should probably throw exceptions
like selectSingle does (rather than returning null like I think they currently
do).
Original comment by steven.b...@gmail.com
on 17 Mar 2011 at 7:08
Original comment by richard.eckart
on 18 Mar 2011 at 4:11
These issues are candidates for version 1.3.0.
Original comment by richard.eckart
on 7 May 2011 at 5:31
I upgraded ClearTK to UimaFIT 1.2.0. Here are the methods that I wanted more
than once:
List<T> selectMatching(JCas jCas, Class<T> selectedType, Annotation annotation)
T selectSingleMatching(JCas jCas, Class<T> selectedType, Annotation annotation)
For that latter one, I have at least one use case where I actually want
something like selectZeroOrOneMatching, where an exception is thrown for 2 or
more found, but I get null back for if there were 0. Perhaps if we go the
Issue 65 route, we could end up with something like:
SQLCAS.from(jCas).selectMatching(type, annotation).zeroOrOne()
SQLCAS.from(jCas).selectCovered(type, annotation).single()
SQLCAS.from(jCas).select(type).atIndex(4)
Original comment by steven.b...@gmail.com
on 9 May 2011 at 3:46
Original comment by richard.eckart
on 4 Jan 2012 at 10:51
Original comment by richard.eckart
on 5 Jul 2012 at 4:02
Original comment by richard.eckart
on 7 Jan 2013 at 4:51
Original comment by richard.eckart
on 25 Aug 2013 at 8:17
Original issue reported on code.google.com by
pvogren@gmail.com
on 2 Jul 2010 at 4:44