PyRuSH
PyRuSH is the python implementation of RuSH (Rule-based sentence Segmenter using Hashing), which is originally developed using Java. RuSH is an efficient, reliable, and easy adaptable rule-based sentence segmentation solution. It is specifically designed to handle the telegraphic written text in clinical note. It leverages a nested hash table to execute simultaneous rule processing, which reduces the impact of the rule-base growth on execution time and eliminates the effect of rule order on accuracy.
Decision gist · record as of 2026-08-14
Yes, if you work with clinical notes or telegraphic text and need reliable sentence segmentation. The rule-based approach and spaCy integration make it a solid choice for medical NLP pipelines. Install friction is moderate due to compiled dependencies, but wheels are available for common platforms. No known vulnerabilities and active maintenance are positive signals. Caveat: you must obtain or create a rule configuration file; the package does not ship with defaults.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a rule configuration file (rush_rules.tsv); the package does not ship with default rules, so you must provide or locate a rules file separately.
- Medium install friction due to compiled dependencies (Cython, spacy, PyFastNER, quicksectx).
- Actively maintained with recent releases; last commit 2024-12-04 and latest release 2026-03-28.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-03-28 (139 days) · last repo commit 2024-12-04 · 13 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 76,692 downloads/mo, #14,600 on PyPI
Alternatives
Verify before relying
pip install PyRuSH
from PyRuSH import RuSH
rush = RuSH('path/to/rush_rules.tsv')
sentences = rush.segToSentenceSpans("Your clinical text here.")
for s in sentences:
print(text[s.begin:s.end])- Whether default or example rule files are available in the repository or documentation.
- Performance benchmarks comparing PyRuSH to other clinical sentence segmenters.
- Specific clinical note formats or edge cases the rule set handles best.
What it is and what it does
PyRuSH is a Python port of the Java RuSH sentence segmenter, designed specifically for clinical and telegraphic text where standard sentence boundaries are ambiguous or irregular. It uses a nested hash table to apply rule-based segmentation efficiently, avoiding the rule-order dependencies and performance degradation that plague large rule sets. The package integrates with spaCy 3.x as a sentencizer component, making it usable in standard NLP pipelines alongside other spaCy tools.
The core use case is splitting clinical notes—which often contain abbreviations, line breaks, and formatting inconsistencies—into meaningful sentence units. It depends on spacy, Cython, PyFastNER, quicksectx, loguru, and setuptools, so installation requires compilation on some platforms. The package supports Python 3.6 and later, with prebuilt wheels for recent Python versions across major operating systems.
Use it for
- Segment clinical notes into sentences before downstream NLP tasks like entity extraction or relation prediction.
- Preprocess telegraphic or abbreviated text (e.g., medical shorthand) where standard sentence splitters fail.
- Integrate rule-based sentence segmentation into a spaCy pipeline without writing custom components.
- Handle medical text with irregular formatting, multiple line breaks, and clinical abbreviations.
- Adapt segmentation rules for domain-specific text by modifying the rule configuration file.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with clinical notes or telegraphic text and need reliable sentence segmentation.
The rule-based approach and spaCy integration make it a solid choice for medical NLP pipelines. Install friction is moderate due to compiled dependencies, but wheels are available for common platforms. No known vulnerabilities and active maintenance are positive signals. Caveat: you must obtain or create a rule configuration file; the package does not ship with defaults.
Install
pyrush on PyPI
Before you install
Medium install friction due to compiled dependencies (Cython, spacy, PyFastNER, quicksectx). Actively maintained with recent releases; last commit 2024-12-04 and latest release 2026-03-28. Wheels available for Python 3.9–3.13 across macOS, Linux, and Windows.
Requires a rule configuration file (rush_rules.tsv); the package does not ship with default rules, so you must provide or locate a rules file separately.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install PyRuSH
from PyRuSH import RuSH
rush = RuSH('path/to/rush_rules.tsv')
sentences = rush.segToSentenceSpans("Your clinical text here.")
for s in sentences:
print(text[s.begin:s.end])
Verify before relying
- Whether default or example rule files are available in the repository or documentation.
- Performance benchmarks comparing PyRuSH to other clinical sentence segmenters.
- Specific clinical note formats or edge cases the rule set handles best.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 6 packagesCythonsetuptoolsspacyPyFastNERquicksectxloguru |
| Maintenance | Actively maintained 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,692 / month, #14,600 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3 |
Evidence: pyrush-1.0.13-cp310-cp310-macosx_11_0_arm64.whl; pyrush-1.0.13-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyrush-1.0.13-cp310-cp310-musllinux_1_2_x86_64.whl; pyrush-1.0.13-cp310-cp310-win_amd64.whl; pyrush-1.0.13-cp311-cp311-macosx_11_0_arm64.whl; pyrush-1.0.13-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyrush-1.0.13-cp311-cp311-musllinux_1_2_x86_64.whl; pyrush-1.0.13-cp311-cp311-win_amd64.whl; pyrush-1.0.13-cp312-cp312-macosx_11_0_arm64.whl; pyrush-1.0.13-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyrush-1.0.13-cp312-cp312-musllinux_1_2_x86_64.whl; pyrush-1.0.13-cp312-cp312-win_amd64.whl; pyrush-1.0.13-cp313-cp313-macosx_11_0_arm64.whl; pyrush-1.0.13-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyrush-1.0.13-cp313-cp313-musllinux_1_2_x86_64.whl; pyrush-1.0.13-cp313-cp313-win_amd64.whl; pyrush-1.0.13-cp39-cp39-macosx_11_0_arm64.whl; pyrush-1.0.13-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyrush-1.0.13-cp39-cp39-musllinux_1_2_x86_64.whl; pyrush-1.0.13-cp39-cp39-win_amd64.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 › “clinical sentence segmentation”
- PyRuSHPyRuSH segments clinical and telegraphic text into sentences using…
- segtokSplits Indo-European text into sentences and words using rule-based…
- minisbdDetects sentence boundaries in text across many languages using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Linguistic packages
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.
Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.
Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.
Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.
Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.
However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.
Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
See also pysbd · razdel · segtok · sentence-stream · negspacy · rouge-chinese · unicode-segmentation-rs · jieba · spacy-pkuseg