Class PatternKeywordMarkerFilter

All Implemented Interfaces:
Closeable, AutoCloseable, Unwrappable<TokenStream>

public final class PatternKeywordMarkerFilter extends KeywordMarkerFilter
Marks terms as keywords via the KeywordAttribute. Each token that matches the provided pattern is marked as a keyword by setting KeywordAttribute.setKeyword(boolean) to true.
  • Constructor Details

    • PatternKeywordMarkerFilter

      public PatternKeywordMarkerFilter(TokenStream in, Pattern pattern)
      Create a new PatternKeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer matches the provided Pattern via the KeywordAttribute.
      in - TokenStream to filter
      pattern - the pattern to apply to the incoming term buffer
  • Method Details