WordDelimiterIterator

class WordDelimiterIterator(charTypeTable: ByteArray, val splitOnCaseChange: Boolean, val splitOnNumerics: Boolean, val stemEnglishPossessive: Boolean)

A BreakIterator-like API for iterating over subwords in text, according to WordDelimiterGraphFilter rules.

Constructors

Link copied to clipboard
constructor(charTypeTable: ByteArray, splitOnCaseChange: Boolean, splitOnNumerics: Boolean, stemEnglishPossessive: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Beginning of subword

Link copied to clipboard
var end: Int

End of subword

Link copied to clipboard

end position of text, excluding trailing delimiters

Link copied to clipboard
var length: Int
Link copied to clipboard

If false, causes case changes to be ignored (subwords will only be generated given SUBWORD_DELIM tokens). (Defaults to true)

Link copied to clipboard

If false, causes numeric changes to be ignored (subwords will only be generated given SUBWORD_DELIM tokens). (Defaults to true)

Link copied to clipboard

start position of text, excluding leading delimiters

Link copied to clipboard

If true, causes trailing "'s" to be removed for each subword. (Defaults to true)

Link copied to clipboard

Functions

Link copied to clipboard

Determines if the current word contains only one subword. Note, it could be potentially surrounded by delimiters

Link copied to clipboard
fun next(): Int

Advance to the next subword in the string.

Link copied to clipboard
fun setText(text: CharArray, length: Int)

Reset the text to a new value, and reset all state

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun type(): Int

Return the type of the current subword. This currently uses the type of the first character in the subword.