Class Utility
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Analysis.Cn.Smart
Assembly: Lucene.Net.Analysis.SmartCn.dll
Syntax
public static class Utility
Fields
COMMON_DELIMITER
Delimiters will be filtered to this character by SegTokenFilter
Declaration
public static readonly char[] COMMON_DELIMITER
Field Value
Type | Description |
---|---|
char[] |
END_CHAR_ARRAY
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static readonly char[] END_CHAR_ARRAY
Field Value
Type | Description |
---|---|
char[] |
MAX_FREQUENCE
Maximum bigram frequency (used in the smoothing function).
Declaration
public static readonly int MAX_FREQUENCE
Field Value
Type | Description |
---|---|
int |
NUMBER_CHAR_ARRAY
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static readonly char[] NUMBER_CHAR_ARRAY
Field Value
Type | Description |
---|---|
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 |
---|---|
string |
START_CHAR_ARRAY
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static readonly char[] START_CHAR_ARRAY
Field Value
Type | Description |
---|---|
char[] |
STRING_CHAR_ARRAY
SmartChineseAnalyzer utility constants and methods
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public static readonly char[] STRING_CHAR_ARRAY
Field Value
Type | Description |
---|---|
char[] |
Methods
CompareArray(char[], int, char[], int)
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 |
---|---|---|
char[] | larray | left array |
int | lstartIndex | start offset into |
char[] | rarray | right array |
int | rstartIndex | start offset into |
Returns
Type | Description |
---|---|
int | 0 if the arrays are equal,1 if |
CompareArrayByPrefix(char[], int, char[], int)
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[], int, char[], int).
Declaration
public static int CompareArrayByPrefix(char[] shortArray, int shortIndex, char[] longArray, int longIndex)
Parameters
Type | Name | Description |
---|---|---|
char[] | shortArray | prefix array |
int | shortIndex | offset into |
char[] | longArray | long array (word) |
int | longIndex | offset into |
Returns
Type | Description |
---|---|
int | 0 if |
GetCharType(char)
Return the internal CharType constant of a given character.
Declaration
public static CharType GetCharType(char ch)
Parameters
Type | Name | Description |
---|---|---|
char | ch | input character |
Returns
Type | Description |
---|---|
CharType | Constant from CharType describing the character type. |