Class ElisionFilter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class ElisionFilter
    extends TokenFilter
    Removes elisions from a TokenStream. For example, "l'avion" (the plane) will be tokenized as "avion" (plane).
    See Also:
    Elision in Wikipedia
    • Constructor Detail

      • ElisionFilter

        public ElisionFilter​(TokenStream input,
                             CharArraySet articles)
        Constructs an elision filter with a Set of stop words
        Parameters:
        input - the source TokenStream
        articles - a set of stopword articles
    • Method Detail

      • incrementToken

        public final boolean incrementToken()
                                     throws java.io.IOException
        Increments the TokenStream with a CharTermAttribute without elisioned start
        Specified by:
        incrementToken in class TokenStream
        Returns:
        false for end of stream; true otherwise
        Throws:
        java.io.IOException