Class SetKeywordMarkerFilter

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

public final class SetKeywordMarkerFilter extends KeywordMarkerFilter
Marks terms as keywords via the KeywordAttribute. Each token contained in the provided set is marked as a keyword by setting KeywordAttribute.setKeyword(boolean) to true .
  • Constructor Details

    • SetKeywordMarkerFilter

      public SetKeywordMarkerFilter(TokenStream in, CharArraySet keywordSet)
      Create a new KeywordSetMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
      Parameters:
      in - TokenStream to filter
      keywordSet - the keywords set to lookup the current termbuffer
  • Method Details