Utility

object Utility

SmartChineseAnalyzer utility constants and methods

Properties

Link copied to clipboard

Delimiters will be filtered to this character by SegTokenFilter

Link copied to clipboard
Link copied to clipboard
const val MAX_FREQUENCE: Int

Maximum bigram frequency (used in the smoothing function).

Link copied to clipboard
Link copied to clipboard
const val SPACES: String

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

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun compareArray(larray: CharArray?, lstartIndex: Int, rarray: CharArray?, rstartIndex: Int): Int

compare two arrays starting at the specified offsets.

Link copied to clipboard
fun compareArrayByPrefix(shortArray: CharArray?, shortIndex: Int, longArray: CharArray?, longIndex: Int): 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.

Link copied to clipboard
fun getCharType(ch: Char): Int

Return the internal CharType constant of a given character.