Class Utility
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Analysis.Cn.Smart
Assembly: Lucene.Net.Analysis.SmartCn.dll
Syntax
public static class Utility
Fields
| Improve this Doc View SourceCOMMON_DELIMITER
Delimiters will be filtered to this character by SegTokenFilter
Declaration
public static readonly char[] COMMON_DELIMITER
Field Value
Type | Description |
---|---|
System.Char[] |
END_CHAR_ARRAY
Declaration
public static readonly char[] END_CHAR_ARRAY
Field Value
Type | Description |
---|---|
System.Char[] |
MAX_FREQUENCE
Maximum bigram frequency (used in the smoothing function).
Declaration
public static readonly int MAX_FREQUENCE
Field Value
Type | Description |
---|---|
System.Int32 |
NUMBER_CHAR_ARRAY
Declaration
public static readonly char[] NUMBER_CHAR_ARRAY
Field Value
Type | Description |
---|---|
System.Char[] |
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 |
START_CHAR_ARRAY
Declaration
public static readonly char[] START_CHAR_ARRAY
Field Value
Type | Description |
---|---|
System.Char[] |
STRING_CHAR_ARRAY
Declaration
public static readonly char[] STRING_CHAR_ARRAY
Field Value
Type | Description |
---|---|
System.Char[] |
Methods
| Improve this Doc View SourceCompareArray(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 |
System.Char[] | rarray | right array |
System.Int32 | rstartIndex | start offset into |
Returns
Type | Description |
---|---|
System.Int32 | 0 if the arrays are equal,1 if |
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 |
System.Char[] | longArray | long array (word) |
System.Int32 | longIndex | offset into |
Returns
Type | Description |
---|---|
System.Int32 | 0 if |
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. |