Show / Hide Table of Contents

    Class MockTokenFilter

    A for testing that removes terms accepted by a DFA.

    • Union a list of singletons to act like a StopFilter.
    • Use the complement to act like a KeepWordFilter.
    • Use a regex like .{12,} to act like a LengthFilter.

    Inheritance
    System.Object
    MockTokenFilter
    Namespace: Lucene.Net.Analysis
    Assembly: Lucene.Net.TestFramework.dll
    Syntax
    public sealed class MockTokenFilter : TokenFilter

    Constructors

    | Improve this Doc View Source

    MockTokenFilter(TokenStream, CharacterRunAutomaton)

    Create a new MockTokenFilter.

    Declaration
    public MockTokenFilter(TokenStream input, CharacterRunAutomaton filter)
    Parameters
    Type Name Description
    TokenStream input

    to filter

    CharacterRunAutomaton filter

    DFA representing the terms that should be removed.

    Fields

    | Improve this Doc View Source

    EMPTY_STOPSET

    Empty set of stopwords

    Declaration
    public static readonly CharacterRunAutomaton EMPTY_STOPSET
    Field Value
    Type Description
    CharacterRunAutomaton
    | Improve this Doc View Source

    ENGLISH_STOPSET

    Set of common english stopwords

    Declaration
    public static readonly CharacterRunAutomaton ENGLISH_STOPSET
    Field Value
    Type Description
    CharacterRunAutomaton

    Methods

    | Improve this Doc View Source

    End()

    Declaration
    public override void End()
    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Reset()

    Declaration
    public override void Reset()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)