THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
// Initial brainstorming jcas.select(Token.class).startAt(contextAnnotation).limit(10) // it is IMHO not entirely clear here that contextAnnotation is not included in the result... jcas.select(Token.class).seek(contextAnnotation).skip(1).limit(10) // somehow too complex... jcas.select(Token.class).following(contextAnnotation).limit(10) // Suggestion MS - deleted - I like REC's better with the fs first. // Suggestion REC 1 jcas.select().following(10fs, fs10) // the 10 FSs >= fs jcas.select().following(10fs, fs10, -3) // the 10 FSs >= { fs , after a -3 offset } jcas.select().preceding(3following(2, 20, 10, 100-3) // the 310 FSs >= <{ a bounding FS with begin=10, end=100, in reverse order(?) // Suggestion REC 1 jcas.select().following(fs, 10) // the 10 FSs >= fs jcas.select().following(fs, 10, -3) // the 10 FSs >= { fs , after a -3 offset offset by -3} jcas.select().preceding(10, 100, 3) // the 3 FSs < a bounding FS with begin=10, end=100, in reverse order(?) // Suggestion REC 2 jcas.at(fs).select(Token.class).following(10) // the 10 FSs >= fs jcas.at(fs).select(Token.class).skip(-3).following(10) // the 10 FSs >= { fs , after a -3 offset } jcas.at(10, 100).select(Token.class).preceding(3) // the 3 FSs < a bounding FS with begin=10, end=100, in reverse order(?) // MS: following(10) is the same as the standard stream method limit(10), I think. // Suggestion REC 3 jcas.select(Token.class, fs).following(10) // the 10 FSs >= fs jcas.select(Token.class, fs).skip(-3).following(10) // the 10 FSs >= { fs , after a -3 offset } jcas.select(Token.class, 10, 100).preceding(3) // the 3 FSs < a bounding FS with begin=10, end=100, in reverse order(?) // MS: basic idea: extend select syntax, with 2nd positional argument, representing a position or a bound |
REC: I would put the context to the front and the conditions to the back...
...