segmentation
Unicode text segmentation tr29
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install segmentation
choosenim install segmentation
git clone https://github.com/nitely/nim-segmentation
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| segmentation | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/nitely/nim-segmentation |
|---|---|
| Homepage | https://github.com/nitely/nim-segmentation |
| Registry Source | nimble_official |
README
Segmentation
An implementation of Unicode Text Segmentation (tr29). The splitting is made through a fast DFA.
See nim-graphemes for grapheme cluster segmentation
Install
nimble install segmentation
Compatibility
Nim 0.19, 0.20, +1.0.4
Usage
import sequtils
import segmentation
assert toSeq("The (“brown”) fox can’t jump 32.3 feet, right?".words) ==
@["The", " ", "(", "“", "brown", "”", ")", " ", "fox", " ",
"can’t", " ", "jump", " ", "32.3", " ", "feet", ",", " ",
"right", "?"]
Docs
Tests
nimble test
LICENSE
MIT