--- id: pyrush version: "1.0.13" license: MIT license_treatment: permissive maintenance: active --- # 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. License: permissive · Maintenance: active · Downloads: 76.7K/mo ## 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 above — verify before relying. PyRuSH segments clinical and telegraphic text into sentences using rule-based hashing, handling abbreviations and formatting irregularities common in medical notes. 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 pip install pyrush uv add pyrush poetry add pyrush ## Installing PyRuSH 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. 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]) 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. 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_current - Install friction: medium - Maintenance: active - Downloads: 76.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags clinical sentence segmentation, rule-based sentence splitter, medical text NLP, sentence boundary detection, clinical note processing, telegraphic text parsing, spacy sentence component, clinical-nlp, sentence-segmentation, spacy-component [View on SkillFed](https://skillfed.io/packages/pyrush) · [View on PyPI](https://pypi.org/project/pyrush/)