Registry / data / uniseg

uniseg

JSON →
library0.10.1pypypi✓ verified 81d ago

The uniseg library determines Unicode text segmentation boundaries, such as grapheme clusters, words, sentences, and line break opportunities, following the Unicode Standard Annex #29 and UAX #14. Current version is 0.10.1, requires Python >=3.9, and released with no fixed cadence.

pip install uniseg
INSTALL
IMPORT
SIG · UNISEG
U
uniseg
datapythonv0.10.1
Install
1.8s avg
Import
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.10.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 29MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PackageNotFoundError
from uniseg import PackageNotFoundError
from uniseg import grapheme_clusters
unidata_version
from uniseg import unidata_version
version
from uniseg import version

Basic usage: iterate over Unicode segment boundaries.

from uniseg import grapheme_clusters, word_segment, sentences, line_break text = "Hello World! 🌍" print("Grapheme clusters:", list(grapheme_clusters(text))) print("Words:", list(word_segment(text))) print("Sentences:", list(sentences(text))) print("Line breaks:", list(line_break(text)))
Debug
Known issues
gotchaFunctions return iterators, not lists. Call list() to inspect or store.
fix
Wrap calls in list() if you need to index or reuse results.
affects: all
gotchaGrapheme cluster and word segmentation depend on Unicode version bundled with library. Ensure system Unicode data is not mixed.
fix
Check uniseg.UNICODE_VERSION for the Unicode version used.
affects: all
gotchaThe word_segment function returns segments as strings including punctuation and spaces. Do not assume it returns only words.
fix
Filter results if only alphanumeric words are needed.
affects: all
Upgrade
Version history
0.10.1latest on PyPI · released Jan 9, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
22
OpenAI (training)
1
Resources
uniseg — pip install uniseg · libregistry