Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  • uniformity (ease of learning)
  • conciseness (in expression)
  • alignment with / exploitation of Java 8 styles, including streams
  • hiding implementation internals

PDF of chapter on select documentation for review

This is the version 2 after incorporating most of Richard's suggestions on version 1, uploaded Monday 17 Oct at 3:45 EDT.

Here: 

View file
nameuima_v3_users_guide.pdf
height250

Conceptual overview MS

Gliffy Diagram
nameuv3 fs iteration design

...

Code Block
languagejava
// 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...

...