private Set < String > getSet ( boolean isInflected ) { Set < String > set = new HashSet <> ( ) ; for ( PatternToken patternToken : patternTokens ) { boolean acceptInflectionValue = isInflected ? patternToken . isInflected ( ) : ! patternToken . isInflected ( ) ; if ( acceptInflectionValue && ! patternToken . getNegation ( ) && ! patternToken . isRegularExpression ( ) && ! patternToken . isReferenceElement ( ) && patternToken . getMinOccurrence ( ) > 0 ) { String str = patternToken . getString ( ) ; if ( ! StringTools . isEmpty ( str ) ) { set . add ( str . toLowerCase ( ) ) ; } } } return Collections . unmodifiableSet ( set ) ; }
tokens that just refer to a word - no regex and optionally no inflection etc .