Table-driven engine implementing UAX #29 word break.
Generated from the WordBreak state machine tables published in PRI #555.
See Unicode.String.Dfa for the engine.
Summary
Functions
Returns true when a segment boundary falls between string_before and
string_after.
Returns {segment, rest}, or nil when string is empty.
Splits string using the rules alone, without the dictionary pass.
Splits string into segments.
Functions
Returns true when a segment boundary falls between string_before and
string_after.
The automaton always restarts at a boundary, so the question "is there a break at this join" is answered by segmenting from the start of the combined text and asking whether any boundary lands exactly on the join.
Returns {segment, rest}, or nil when string is empty.
Splits string using the rules alone, without the dictionary pass.
Splits string into segments.
Where the data defines dictionary symbols, the rule-based segments are passed through the dictionary breaker afterwards, which is how the standard describes complex context-dependent breaking being triggered.