private boolean matchLemmaRegexp ( AnalyzedTokenReadings aToken , Pattern pattern ) { boolean matches = false ; for ( AnalyzedToken analyzedToken : aToken ) { final String posTag = analyzedToken . getLemma ( ) ; if ( posTag != null ) { final Matcher m = pattern . matcher ( posTag ) ; if ( m . matches ( ) ) { matches = true ; break ; } } } return matches ; }
Match lemma with regular expression