public class Utility extends Object
| Modifier and Type | Field and Description |
|---|---|
static char[] |
COMMON_DELIMITER
Delimiters will be filtered to this character by
SegTokenFilter |
static char[] |
END_CHAR_ARRAY |
static int |
MAX_FREQUENCE
Maximum bigram frequency (used in the smoothing function).
|
static char[] |
NUMBER_CHAR_ARRAY |
static String |
SPACES
Space-like characters that need to be skipped: such as space, tab, newline, carriage return.
|
static char[] |
START_CHAR_ARRAY |
static char[] |
STRING_CHAR_ARRAY |
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareArray(char[] larray,
int lstartIndex,
char[] rarray,
int rstartIndex)
compare two arrays starting at the specified offsets.
|
static int |
compareArrayByPrefix(char[] shortArray,
int shortIndex,
char[] longArray,
int longIndex)
Compare two arrays, starting at the specified offsets, but treating shortArray as a prefix to longArray.
|
static int |
getCharType(char ch)
Return the internal
CharType constant of a given character. |
public static final char[] STRING_CHAR_ARRAY
public static final char[] NUMBER_CHAR_ARRAY
public static final char[] START_CHAR_ARRAY
public static final char[] END_CHAR_ARRAY
public static final char[] COMMON_DELIMITER
SegTokenFilterpublic static final String SPACES
public static final int MAX_FREQUENCE
public static int compareArray(char[] larray,
int lstartIndex,
char[] rarray,
int rstartIndex)
larray - left arraylstartIndex - start offset into larrayrarray - right arrayrstartIndex - start offset into rarraypublic static int compareArrayByPrefix(char[] shortArray,
int shortIndex,
char[] longArray,
int longIndex)
compareArray(char[], int, char[], int)shortArray - prefix arrayshortIndex - offset into shortArraylongArray - long array (word)longIndex - offset into longArraycompareArray(char[], int, char[], int)Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.