razdel
Splits russian text into tokens, sentences, section. Rule-based
What it is and what it does
razdel is a rule-based tokenizer and sentence splitter designed specifically for Russian text. It provides two main functions: tokenize() breaks text into words and punctuation with character offsets, and sentenize() splits text into sentences. The package returns Substring objects that preserve the original text span, making it easy to map results back to the source.
The library is optimized against four Russian corpora (SynTagRus, OpenCorpora, GICRYA, RNC) consisting mainly of news and fiction. It trades off perfect accuracy for practical performance: the description acknowledges that tokenization has no single correct answer and documents its segmentation choices explicitly. Benchmarks show it achieves competitive error rates on these domains while maintaining reasonable speed.
Use it for:
- Preprocess Russian news articles or literary texts before feeding into downstream NLP models
- Extract individual words and punctuation from Russian text while preserving their exact positions for annotation or highlighting
- Split Russian documents into sentences for batch processing or analysis at the sentence level
- Build Russian text search or indexing pipelines that require accurate token boundaries
- Evaluate or compare tokenization quality on Russian corpora using the included benchmarking tools
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Splits Russian text into sentences and tokens using rule-based heuristics, returning character-offset substrings for precise text reconstruction.
Yes, if your text is primarily Russian news or fiction. The package is lightweight, actively maintained, permissively licensed, and offers competitive accuracy on its target domains. Install with caution if your text is from social media, legal documents, or scientific articles—the description explicitly warns performance may degrade outside news/fiction.
Install
razdel on PyPI
pip
pip install razdeluv
uv add razdelpoetry
poetry add razdelInstalling razdel
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of April 2026 with 286 repository stars.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
Quickstart
from razdel import tokenize, sentenize
tokens = list(tokenize('Кружка-термос на 0.5л'))
sents = list(sentenize('Так в чем же дело? Не радуют.'))
Verify before relying
- Whether performance on non-news/fiction domains (social media, legal, scientific) is documented or measurable
- Exact Python version support range beyond the '3.5+' claim in the description
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2,332 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,482/month — #11,639 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: razdel-0.5.0-py3-none-any.whl
Keywords: nlp, natural language processing, russian, token, sentence, tokenize
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
segtokSplits Indo-European text into sentences and…
permissive · top 15,000 on PyPI
PyRuSHPyRuSH segments clinical and telegraphic text…
permissive · top 15,000 on PyPI
tokenizerTokenizes Icelandic text into words,…
permissive · top 15,000 on PyPI
pysbdDetects sentence boundaries in text using…
permissive · top 5,000 on PyPI
segmentsSegments provides Unicode-aware tokenization…
permissive · top 5,000 on PyPI
sacremosesSacremoses provides tokenization,…
permissive · top 5,000 on PyPI
sentence-streamSplits text streams into sentences even when…
permissive · top 15,000 on PyPI
jieba3kPerforms Chinese word segmentation, breaking…
unclear · top 15,000 on PyPI
hassilParses natural language sentences into…
permissive · top 15,000 on PyPI
pymorphy3-dicts-ruProvides Russian morphological dictionaries for…
permissive · top 15,000 on PyPI