StemmerUtil

Some commonly-used stemming functions.

Functions

Link copied to clipboard
fun delete(s: CharArray, pos: Int, len: Int): Int

Delete a character in-place.

Link copied to clipboard
fun deleteN(s: CharArray, pos: Int, len: Int, nChars: Int): Int

Delete n characters in-place.

Link copied to clipboard
fun endsWith(s: CharArray, len: Int, suffix: CharArray): Boolean
fun endsWith(s: CharArray, len: Int, suffix: String): Boolean

Returns true if the character array ends with the suffix.

Link copied to clipboard
fun startsWith(s: CharArray, len: Int, prefix: String): Boolean

Returns true if the character array starts with the prefix.