Documentation
¶
Index ¶
Constants ¶
View Source
const ( RU = "RU" LAT = "LAT" INT = "INT" PUNCT = "PUNCT" OTHER = "OTHER" )
Atom kinds mirror upstream razdel.segmenters.tokenize (RU, LAT, INT, PUNCT, OTHER).
View Source
const Brackets = openBracket + closeBracket
Brackets is OPEN + CLOSE (upstream BRACKETS).
View Source
const Dashes = dashes
Dashes is upstream DASHES.
View Source
const Endings = endings
Endings is upstream ENDINGS.
View Source
const PunctSet = "\\/!#$%&*+,.:;<=>?@^_`|~№…" + Dashes + Quotes + Brackets
PunctSet is the character class used in upstream ATOM's PUNCT alternative (PUNCTS in tokenize.py: ascii punct + № … + dashes + quotes + brackets).
View Source
const Quotes = openQuote + closeQuote + genericQuote
Quotes is OPEN + CLOSE + GENERIC (upstream QUOTES).
Variables ¶
This section is empty.
Functions ¶
func TokenSpans ¶
TokenSpans returns (start, end) byte offsets for each token, matching upstream find_substrings.
func TokenTexts ¶
TokenTexts returns final token strings (upstream tokenize() without find_substrings offset pass).
Types ¶
Click to show internal directories.
Click to hide internal directories.