Show / Hide Table of Contents

    Class ShingleAnalyzerWrapper

    A ShingleAnalyzerWrapper wraps a ShingleFilter around another Analyzer.

    A shingle is another name for a token based n-gram.

    Inheritance
    System.Object
    Analyzer
    AnalyzerWrapper
    ShingleAnalyzerWrapper
    Inherited Members
    AnalyzerWrapper.WrapReader(String, TextReader)
    AnalyzerWrapper.CreateComponents(String, TextReader)
    AnalyzerWrapper.GetPositionIncrementGap(String)
    AnalyzerWrapper.GetOffsetGap(String)
    AnalyzerWrapper.InitReader(String, TextReader)
    Lucene.Net.Analysis.Analyzer.NewAnonymous(Func<, , >)
    Lucene.Net.Analysis.Analyzer.NewAnonymous(Func<, , >, Lucene.Net.Analysis.ReuseStrategy)
    Lucene.Net.Analysis.Analyzer.NewAnonymous(Func<, , >, Func<, , >)
    Lucene.Net.Analysis.Analyzer.NewAnonymous(Func<, , >, Func<, , >, Lucene.Net.Analysis.ReuseStrategy)
    Analyzer.GetTokenStream(String, TextReader)
    Analyzer.GetTokenStream(String, String)
    Analyzer.Strategy
    Analyzer.Dispose()
    Analyzer.Dispose(Boolean)
    Analyzer.GLOBAL_REUSE_STRATEGY
    Analyzer.PER_FIELD_REUSE_STRATEGY
    Namespace: Lucene.Net.Analysis.Shingle
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class ShingleAnalyzerWrapper : AnalyzerWrapper

    Constructors

    | Improve this Doc View Source

    ShingleAnalyzerWrapper(Analyzer)

    Declaration
    public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer)
    Parameters
    Type Name Description
    Analyzer defaultAnalyzer
    | Improve this Doc View Source

    ShingleAnalyzerWrapper(Analyzer, Int32)

    Declaration
    public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int maxShingleSize)
    Parameters
    Type Name Description
    Analyzer defaultAnalyzer
    System.Int32 maxShingleSize
    | Improve this Doc View Source

    ShingleAnalyzerWrapper(Analyzer, Int32, Int32)

    Declaration
    public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize)
    Parameters
    Type Name Description
    Analyzer defaultAnalyzer
    System.Int32 minShingleSize
    System.Int32 maxShingleSize
    | Improve this Doc View Source

    ShingleAnalyzerWrapper(Analyzer, Int32, Int32, String, Boolean, Boolean, String)

    Creates a new ShingleAnalyzerWrapper

    Declaration
    public ShingleAnalyzerWrapper(Analyzer delegate, int minShingleSize, int maxShingleSize, string tokenSeparator, bool outputUnigrams, bool outputUnigramsIfNoShingles, string fillerToken)
    Parameters
    Type Name Description
    Analyzer delegate

    Analyzer whose TokenStream is to be filtered

    System.Int32 minShingleSize

    Min shingle (token ngram) size

    System.Int32 maxShingleSize

    Max shingle size

    System.String tokenSeparator

    Used to separate input stream tokens in output shingles

    System.Boolean outputUnigrams

    Whether or not the filter shall pass the original tokens to the output stream

    System.Boolean outputUnigramsIfNoShingles

    Overrides the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? Note that if outputUnigrams==true, then unigrams are always output, regardless of whether any shingles are available.

    System.String fillerToken

    filler token to use when positionIncrement is more than 1

    | Improve this Doc View Source

    ShingleAnalyzerWrapper(LuceneVersion)

    Wraps StandardAnalyzer.

    Declaration
    public ShingleAnalyzerWrapper(LuceneVersion matchVersion)
    Parameters
    Type Name Description
    LuceneVersion matchVersion
    | Improve this Doc View Source

    ShingleAnalyzerWrapper(LuceneVersion, Int32, Int32)

    Wraps StandardAnalyzer.

    Declaration
    public ShingleAnalyzerWrapper(LuceneVersion matchVersion, int minShingleSize, int maxShingleSize)
    Parameters
    Type Name Description
    LuceneVersion matchVersion
    System.Int32 minShingleSize
    System.Int32 maxShingleSize

    Properties

    | Improve this Doc View Source

    FillerToken

    Declaration
    public string FillerToken { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    MaxShingleSize

    The max shingle (token ngram) size

    Declaration
    public int MaxShingleSize { get; }
    Property Value
    Type Description
    System.Int32

    The max shingle (token ngram) size

    | Improve this Doc View Source

    MinShingleSize

    The min shingle (token ngram) size

    Declaration
    public int MinShingleSize { get; }
    Property Value
    Type Description
    System.Int32

    The min shingle (token ngram) size

    | Improve this Doc View Source

    OutputUnigrams

    Declaration
    public bool OutputUnigrams { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OutputUnigramsIfNoShingles

    Declaration
    public bool OutputUnigramsIfNoShingles { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TokenSeparator

    Declaration
    public string TokenSeparator { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    GetWrappedAnalyzer(String)

    Declaration
    protected override sealed Analyzer GetWrappedAnalyzer(string fieldName)
    Parameters
    Type Name Description
    System.String fieldName
    Returns
    Type Description
    Analyzer
    | Improve this Doc View Source

    WrapComponents(String, TokenStreamComponents)

    Declaration
    protected override TokenStreamComponents WrapComponents(string fieldName, TokenStreamComponents components)
    Parameters
    Type Name Description
    System.String fieldName
    TokenStreamComponents components
    Returns
    Type Description
    TokenStreamComponents
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)