public void addReading ( AnalyzedToken token ) { List < AnalyzedToken > l = new ArrayList <> ( Arrays . asList ( anTokReadings ) . subList ( 0 , anTokReadings . length - 1 ) ) ; if ( anTokReadings [ anTokReadings . length - 1 ] . getPOSTag ( ) != null ) { l . add ( anTokReadings [ anTokReadings . length - 1 ] ) ; } token . setWhitespaceBefore ( isWhitespaceBefore ) ; l . add ( token ) ; anTokReadings = l . toArray ( new AnalyzedToken [ 0 ] ) ; if ( token . getToken ( ) . length ( ) > this . token . length ( ) ) { //in case a longer token is added this . token = token . getToken ( ) ; } anTokReadings [ anTokReadings . length - 1 ] . setWhitespaceBefore ( isWhitespaceBefore ) ; isParaEnd = hasPosTag ( PARAGRAPH_END_TAGNAME ) ; isSentEnd = hasPosTag ( SENTENCE_END_TAGNAME ) ; setNoRealPOStag ( ) ; hasSameLemmas = areLemmasSame ( ) ; }
Add a new reading .