Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Utility

    SmartChineseAnalyzer utility constants and methods

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    Utility
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Analysis.Cn.Smart
    Assembly: Lucene.Net.Analysis.SmartCn.dll
    Syntax
    public static class Utility

    Fields

    | Improve this Doc View Source

    COMMON_DELIMITER

    Delimiters will be filtered to this character by SegTokenFilter

    Declaration
    public static readonly char[] COMMON_DELIMITER
    Field Value
    Type Description
    System.Char[]
    | Improve this Doc View Source

    END_CHAR_ARRAY

    Declaration
    public static readonly char[] END_CHAR_ARRAY
    Field Value
    Type Description
    System.Char[]
    | Improve this Doc View Source

    MAX_FREQUENCE

    Maximum bigram frequency (used in the smoothing function).

    Declaration
    public static readonly int MAX_FREQUENCE
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    NUMBER_CHAR_ARRAY

    Declaration
    public static readonly char[] NUMBER_CHAR_ARRAY
    Field Value
    Type Description
    System.Char[]
    | Improve this Doc View Source

    SPACES

    Space-like characters that need to be skipped: such as space, tab, newline, carriage return.

    Declaration
    public static readonly string SPACES
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    START_CHAR_ARRAY

    Declaration
    public static readonly char[] START_CHAR_ARRAY
    Field Value
    Type Description
    System.Char[]
    | Improve this Doc View Source

    STRING_CHAR_ARRAY

    Declaration
    public static readonly char[] STRING_CHAR_ARRAY
    Field Value
    Type Description
    System.Char[]

    Methods

    | Improve this Doc View Source

    CompareArray(Char[], Int32, Char[], Int32)

    Compare two arrays starting at the specified offsets.

    Declaration
    public static int CompareArray(char[] larray, int lstartIndex, char[] rarray, int rstartIndex)
    Parameters
    Type Name Description
    System.Char[] larray

    left array

    System.Int32 lstartIndex

    start offset into larray

    System.Char[] rarray

    right array

    System.Int32 rstartIndex

    start offset into rarray

    Returns
    Type Description
    System.Int32

    0 if the arrays are equal,1 if larray > rarray, -1 if larray < rarray

    | Improve this Doc View Source

    CompareArrayByPrefix(Char[], Int32, Char[], Int32)

    Compare two arrays, starting at the specified offsets, but treating shortArray as a prefix to longArray. As long as shortArray is a prefix of longArray, return 0. Otherwise, behave as CompareArray(Char[], Int32, Char[], Int32).

    Declaration
    public static int CompareArrayByPrefix(char[] shortArray, int shortIndex, char[] longArray, int longIndex)
    Parameters
    Type Name Description
    System.Char[] shortArray

    prefix array

    System.Int32 shortIndex

    offset into shortArray

    System.Char[] longArray

    long array (word)

    System.Int32 longIndex

    offset into longArray

    Returns
    Type Description
    System.Int32

    0 if shortArray is a prefix of longArray, otherwise act as CompareArray(Char[], Int32, Char[], Int32).

    | Improve this Doc View Source

    GetCharType(Char)

    Return the internal CharType constant of a given character.

    Declaration
    public static CharType GetCharType(char ch)
    Parameters
    Type Name Description
    System.Char ch

    input character

    Returns
    Type Description
    CharType

    Constant from CharType describing the character type.

    See Also
    CharType
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.