public static boolean isFirstCoveredToken ( final Token token , final Annotation annotation ) { final JCas jCas = getJCas ( annotation ) ; final List < Token > coveredTokens = JCasUtil . selectCovered ( jCas , Token . class , annotation ) ; if ( coveredTokens . isEmpty ( ) ) { return false ; } else { final Token firstCoveredToken = coveredTokens . get ( 0 ) ; return haveSameSpan ( token , firstCoveredToken ) ; } }
Returns whether the given token is the first token covered by the given annotation .