Show / Hide Table of Contents

    Class SmartChineseAnalyzer

    SmartChineseAnalyzer is an analyzer for Chinese or mixed Chinese-English text. The analyzer uses probabilistic knowledge to find the optimal word segmentation for Simplified Chinese text. The text is first broken into sentences, then each sentence is segmented into words.

    Segmentation is based upon the Hidden Markov Model. A large training corpus was used to calculate Chinese word frequency probability.

    This analyzer requires a dictionary to provide statistical data. SmartChineseAnalyzer has an included dictionary out-of-box.

    The included dictionary data is from ICTCLAS1.0. Thanks to ICTCLAS for their hard work, and for contributing the data under the Apache 2 License!

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Analyzer
    SmartChineseAnalyzer
    Inherited Members
    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.InitReader(String, TextReader)
    Analyzer.GetPositionIncrementGap(String)
    Analyzer.GetOffsetGap(String)
    Analyzer.Strategy
    Analyzer.Dispose()
    Analyzer.Dispose(Boolean)
    Analyzer.GLOBAL_REUSE_STRATEGY
    Analyzer.PER_FIELD_REUSE_STRATEGY
    Namespace: Lucene.Net.Analysis.Cn.Smart
    Assembly: Lucene.Net.Analysis.SmartCn.dll
    Syntax
    public sealed class SmartChineseAnalyzer : Analyzer

    Constructors

    | Improve this Doc View Source

    SmartChineseAnalyzer(LuceneVersion)

    Create a new SmartChineseAnalyzer, using the default stopword list.

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

    SmartChineseAnalyzer(LuceneVersion, CharArraySet)

    Create a new SmartChineseAnalyzer, using the provided CharArraySet of stopwords.

    Note: the set should include punctuation, unless you want to index punctuation!

    Declaration
    public SmartChineseAnalyzer(LuceneVersion matchVersion, CharArraySet stopWords)
    Parameters
    Type Name Description
    LuceneVersion matchVersion
    CharArraySet stopWords

    CharArraySet of stopwords to use.

    | Improve this Doc View Source

    SmartChineseAnalyzer(LuceneVersion, Boolean)

    Create a new SmartChineseAnalyzer, optionally using the default stopword list.

    The included default stopword list is simply a list of punctuation. If you do not use this list, punctuation will not be removed from the text!

    Declaration
    public SmartChineseAnalyzer(LuceneVersion matchVersion, bool useDefaultStopWords)
    Parameters
    Type Name Description
    LuceneVersion matchVersion
    System.Boolean useDefaultStopWords

    true to use the default stopword list.

    Methods

    | Improve this Doc View Source

    CreateComponents(String, TextReader)

    Declaration
    protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
    Parameters
    Type Name Description
    System.String fieldName
    TextReader reader
    Returns
    Type Description
    TokenStreamComponents
    | Improve this Doc View Source

    GetDefaultStopSet()

    Returns an unmodifiable instance of the default stop-words set.

    Declaration
    public static CharArraySet GetDefaultStopSet()
    Returns
    Type Description
    CharArraySet

    An unmodifiable instance of the default stop-words set.

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