Documentation
¶
Overview ¶
Package segment implements the Unicode text segmentation rules of UAX #29 (grapheme clusters, words, sentences) for Intl.Segmenter. The rules are the default ones of Unicode 16; there is no dictionary, so scripts written without spaces (Thai, Lao, Khmer, Burmese, Japanese, Chinese) are cut where UAX #29 cuts them, not at the word boundaries ICU finds with its dictionaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Boundaries ¶
Boundaries returns the break positions (indexes into rs, including 0 and len(rs)) of kind "grapheme", "word" or "sentence". An empty input has no boundaries.
Types ¶
This section is empty.