uniseg
Determine Unicode text segmentations
Decision gist · record as of 2026-08-14
Yes, if you need Unicode-aware text segmentation in pure Python. The package is stable, has no dependencies, and recently achieved full Unicode test compliance. Install friction is minimal. The aging maintenance status (217 days since last release) is a minor concern for a mature library, but the recent test milestone and current Python version support suggest active stewardship. Avoid if you need maximum performance—PyICU is faster but requires compilation and external libraries.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low install friction; pure Python with no runtime dependencies.
- Maintenance status is aging—last release was 217 days ago—but the package recently passed all Unicode breaking tests and supports current Python versions (3.9+).
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), imposing no restrictions on use, modification, or distribution.
last release 2026-01-09 (217 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,360 downloads/mo, #13,089 on PyPI
Alternatives
Verify before relying
pip install uniseg
import uniseg.graphemecluster
import uniseg.wordbreak
import uniseg.linebreak
for cluster in uniseg.graphemecluster.graphemeclusters('café'):
print(cluster)
for word in uniseg.wordbreak.words('hello world'):
print(word)- Performance characteristics compared to PyICU or other segmentation libraries for large-scale text processing.
- Whether the package's rule-based grapheme cluster segmentation (reintroduced in 0.9.0) handles all modern Unicode combining sequences correctly.
What it is and what it does
uniseg is a pure-Python library for determining Unicode text segmentation boundaries according to the Unicode Standard. It provides functions to identify grapheme cluster boundaries (user-perceived characters that may span multiple code points), word breaks, sentence breaks, and line break opportunities. The package also includes text-wrapping classes for both monospace (console) and proportional (graphical) font environments, making it useful for applications that need to handle text layout and display correctly across different writing systems.
The library implements the Unicode Standard Annex rules for text segmentation without requiring external C libraries or dictionaries. This makes it more portable than alternatives like PyICU, though potentially slower. It supports current Python versions (3.9 through 3.13) and recently achieved a milestone by passing all Unicode breaking tests in version 0.9.0, indicating improved correctness for edge cases.
Use it for
- Implement proper text wrapping in CLI tools that must respect Unicode line-breaking rules across different scripts.
- Build text editors or word processors that need to identify grapheme cluster boundaries for cursor positioning and text selection.
- Process multilingual text to find word boundaries without relying on language-specific dictionaries.
- Format console output with correct line breaks for Unicode strings containing combining characters or emoji.
- Analyze or segment Unicode text in natural language processing pipelines that require Unicode-aware boundaries.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need Unicode-aware text segmentation in pure Python.
The package is stable, has no dependencies, and recently achieved full Unicode test compliance. Install friction is minimal. The aging maintenance status (217 days since last release) is a minor concern for a mature library, but the recent test milestone and current Python version support suggest active stewardship. Avoid if you need maximum performance—PyICU is faster but requires compilation and external libraries.
Install
uniseg on PyPI
Before you install
Low install friction; pure Python with no runtime dependencies. Maintenance status is aging—last release was 217 days ago—but the package recently passed all Unicode breaking tests and supports current Python versions (3.9+).
Requires Python 3.9 or later.
License in practice
Licensed under MIT (permissive), imposing no restrictions on use, modification, or distribution.
Quickstart
pip install uniseg
import uniseg.graphemecluster
import uniseg.wordbreak
import uniseg.linebreak
for cluster in uniseg.graphemecluster.graphemeclusters('café'):
print(cluster)
for word in uniseg.wordbreak.words('hello world'):
print(word)
Verify before relying
- Performance characteristics compared to PyICU or other segmentation libraries for large-scale text processing.
- Whether the package's rule-based grapheme cluster segmentation (reintroduced in 0.9.0) handles all modern Unicode combining sequences correctly.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 217 days since the last release |
| First released | |
| Downloads | 98,360 / month, #13,089 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Text Processing |
Evidence: uniseg-0.10.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “grapheme cluster boundaries”
- unisegDetermines Unicode text segmentation boundaries—grapheme clusters,…
- graphemeuProvides string manipulation functions that work with user-perceived…
- wcwidthMeasures the displayed width of Unicode strings in terminals,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also segments · unicode-segmentation-rs · unicodedataplus · grapheme · graphemeu · semantic-text-splitter · pysbd · segtok · pyuca · confusable-homoglyphs