segmentation
Unicode text segmentation tr29
Summary
| Latest Version | 0.2.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-01 07:17 |
Tags
Authors
- Esteban Castro Borsani (@nitely)
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 | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.20 | No |
| unicodedb >= | 0.14.1 | No |
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 +1.6.20
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