pysbd
pysbd (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages.
What it is and what it does
pySBD is a rule-based sentence segmenter that splits text into individual sentences. It is a Python port of the Ruby Pragmatic Segmenter library, designed to handle edge cases like abbreviations (e.g., "E. Smith"), decimal points (e.g., "p. 55"), and other punctuation ambiguities without requiring training data. The package works out-of-the-box with minimal configuration.
You instantiate a Segmenter with a language code and call its segment() method on text to get a list of sentences. It can also be integrated as a spaCy pipeline component. The package has no runtime dependencies, making installation straightforward. However, it is currently English-only and has been abandoned since early 2021, meaning no new language support or bug fixes are being released.
Use it for:
- Preprocessing raw text for NLP pipelines that require sentence-level input before tokenization or parsing.
- Splitting document text into sentences for downstream tasks like named entity recognition or sentiment analysis.
- Handling text with abbreviations and edge-case punctuation where naive split-on-period approaches fail.
- Integrating sentence segmentation into spaCy-based NLP workflows via the PySBDFactory component.
- Preparing text corpora for machine learning where sentence boundaries must be respected.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects sentence boundaries in text using rule-based heuristics, splitting paragraphs into individual sentences while handling edge cases like abbreviations and decimal points.
Yes, if you need English-only sentence segmentation and can tolerate an abandoned package. The rule-based approach is stable and has no dependencies, so it is unlikely to break due to environment changes. However, do not install if you need active maintenance, multi-language support, or assurance of ongoing bug fixes. For production systems, consider whether a maintained alternative better fits your risk tolerance.
Install
pysbd on PyPI
pip
pip install pysbduv
uv add pysbdpoetry
poetry add pysbdInstalling pysbd
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2021-02-11, over 2010 days ago. No active maintenance or bug fixes should be expected.
License in practice
MIT license is permissive and imposes minimal restrictions; you can use, modify, and distribute the package freely in commercial or private projects with only attribution required.
Quickstart
pip install pysbd
import pysbd
text = "My name is Jonas E. Smith. Please turn to p. 55."
seg = pysbd.Segmenter(language="en", clean=False)
print(seg.segment(text))
Currently supports English only; other languages are not yet available.
Verify before relying
- Whether the package's 97.92% accuracy on the Golden Rule Set still holds in practice for modern text patterns.
- Whether abandonment affects real-world reliability or if the rule set remains stable enough for production use.
- Compatibility with Python versions beyond 3.8 (classifiers list ends at 3.8; current support unclear).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,010 days since the last release |
| First released | |
| Downloads | 5,792,822/month — #2,036 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysbd-0.3.4-py3-none-any.whl
Keywords: natural-language-processing, nlp
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
PyRuSHPyRuSH segments clinical and telegraphic text…
permissive · top 15,000 on PyPI
minisbdDetects sentence boundaries in text across many…
agpl · top 15,000 on PyPI
sentence-streamSplits text streams into sentences even when…
permissive · top 15,000 on PyPI
segtokSplits Indo-European text into sentences and…
permissive · top 15,000 on PyPI
razdelSplits Russian text into sentences and tokens…
permissive · top 15,000 on PyPI
unisegDetermines Unicode text segmentation…
permissive · top 15,000 on PyPI
semantic-text-splitterSplits long text into semantically meaningful…
permissive · top 15,000 on PyPI
unicode-segmentation-rsProvides Unicode text segmentation (graphemes,…
unclear · top 15,000 on PyPI
negspacyAdds negation detection to spaCy pipelines…
permissive · top 15,000 on PyPI