Registry / ai-ml / sentencex

sentencex

JSON →
library1.0.30pypypi✓ verified 89d ago

A sentence segmentation library supporting ~300 languages, powered by Rust for performance. Version 1.0.23, MIT license, maintained by Wikimedia. Releases are frequent with multilingual improvements.

pip install sentencex
INSTALL
IMPORT
SIG · SENTENCEX
S
sentencex
ai-mlpythonv1.0.30
Install
1.7s avg
Import
30ms
Disk
19MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.0.30 · 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
glibc
py 3.10
✕ build_error
✓ 1.6s
py 3.11
✕ build_error
✓ 1.8s
py 3.12
✕ build_error
✓ 1.5s
py 3.13
✕ build_error
✓ 1.7s
py 3.9
✓ —
✓ 1.9s
19MB installed
● package 19MB
Code
Verified usage

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

segment
✓ from sentencex import segment
✗ import sentencex sentencex.segment()
Function is in module, not as attribute of package.

Basic usage: segment English text into sentences.

from sentencex import segment text = "Hello world! This is a test. And another sentence." sentences = segment('en', text) print(list(sentences))
Debug
Known issues
gotchaThe segment function returns a generator, not a list. Must be consumed (e.g., list()) to see all sentences.
fix
Wrap with list() or iterate.
affects: all
gotchaLanguage code must be lowercase (e.g., 'en', 'zh') but not all ISO codes are supported. Check support list.
fix
Use 'en' for English; see README for supported codes.
affects: all
Errors
Common errors & fixes
TypeError: 'generator' object is not subscriptable
segment returns a generator, not a list.
fix
sentences = list(segment('en', text))
ValueError: Unsupported language code: 'English'
Language code must be ISO 639-1 two-letter code, not language name.
fix
Use 'en' instead of 'English'.
Upgrade
Version history
1.0.30latest on PyPI · released Jun 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
sentencex — pip install sentencex · libregistry