Class PhoneticFilter

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

public final class PhoneticFilter extends TokenFilter
Create tokens for phonetic matches.
See Also:
  • Field Details

    • inject

      protected boolean inject
      true if encoded tokens should be added as synonyms
    • encoder

      protected org.apache.commons.codec.Encoder encoder
      phonetic encoder
    • save

      protected AttributeSource.State save
      captured state, non-null when inject=true and a token is buffered
  • Constructor Details

    • PhoneticFilter

      public PhoneticFilter(TokenStream in, org.apache.commons.codec.Encoder encoder, boolean inject)
      Creates a PhoneticFilter with the specified encoder, and either adding encoded forms as synonyms (inject=true) or replacing them.
  • Method Details