public static List < Token > getPrecedingTokens ( JCas jCas , Token token ) { List < Token > result = new ArrayList < Token > ( ) ; for ( Token t : JCasUtil . select ( getInitialView ( jCas ) , Token . class ) ) { if ( t . getBegin ( ) < token . getBegin ( ) ) { result . add ( t ) ; } } return result ; }
Returns a list of tokens preceding the given token