Class PatternTypingFilter

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class PatternTypingFilter
    extends TokenFilter
    Set a type attribute to a parameterized value when tokens are matched by any of a several regex patterns. The value set in the type attribute is parameterized with the match groups of the regex used for matching. In combination with TypeAsSynonymFilter and DropIfFlagged filter this can supply complex synonym patterns that are protected from subsequent analysis, and optionally drop the original term based on the flag set in this filter. See PatternTypingFilterFactory for full documentation.
    Since:
    8.8.0
    See Also:
    PatternTypingFilterFactory