minisbd
Free and open source library for fast sentence boundary detection
What it is and what it does
MiniSBD is a Python library for sentence boundary detection that splits raw text into individual sentences. It uses quantized ONNX models—the same models as Stanza but converted to ONNX format and compressed—to achieve fast, lightweight inference without heavy dependencies. The library supports a large set of languages and can run on CPU or GPU via onnxruntime.
You instantiate a detector with a language code (e.g., "en", "fr", "ja"), then call its sentences() method on text to get an iterable of detected sentences. Models are cached locally after first download. You can also supply a custom ONNX model path or change the cache directory at runtime. The package is free and open source under AGPLv3.
Use it for:
- Preprocessing multilingual text corpora for NLP pipelines that require sentence-level input.
- Splitting user-submitted text into sentences for downstream tasks like translation, sentiment analysis, or named-entity recognition.
- Building text processing workflows that need language-aware sentence segmentation without heavy ML frameworks.
- Tokenizing documents in low-resource or embedded environments where model size and speed matter.
- Handling historical or non-standard text (Ancient Greek, Old French, Sanskrit) where rule-based splitters fail.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects sentence boundaries in text across many languages using lightweight 8-bit quantized ONNX models, splitting raw text into individual sentences.
Yes, if you need fast multilingual sentence segmentation and can accept AGPLv3 licensing. The package is lightweight, actively maintained, has no known vulnerabilities, and supports modern Python versions. Install friction is low. Main caveat: AGPLv3 requires source-code sharing for network deployments; review your use case before adopting in proprietary services.
Install
minisbd on PyPI
pip
pip install minisbduv
uv add minisbdpoetry
poetry add minisbdInstalling minisbd
Before you install
Low install friction: pure Python wheel with only three runtime dependencies (filelock, numpy, onnxruntime). Active maintenance; last commit 2026-03-23.
License in practice
AGPLv3 copyleft: you must share source code of any modifications and provide access to the modified version if you operate it as a network service. Suitable for internal use and open-source projects; review required for proprietary deployments.
Quickstart
pip install minisbd
from minisbd import SBDetect
detector = SBDetect("en")
for sent in detector.sentences("Hello world. How are you?"):
print(sent)
onnxruntime must be installed; optionally onnxruntime-gpu for GPU acceleration. Models are downloaded on first use to ~/.cache/minisbd.
Verify before relying
- Accuracy and performance benchmarks compared to other SBD libraries on multilingual corpora.
- Whether GPU acceleration via onnxruntime-gpu is automatically detected or requires explicit configuration.
- Behavior on edge cases: abbreviations, URLs, mixed-script text, and non-standard punctuation.
Package facts
| License | GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (agpl) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — filelock, numpy, onnxruntime |
| Maintenance | actively maintained — 164 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 245,515/month — #8,730 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: minisbd-0.9.5-py3-none-any.whl
Keywords: Python, sbd, sentence-boundary-detection
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
pysbdDetects sentence boundaries in text using…
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
semantic-text-splitterSplits long text into semantically meaningful…
permissive · top 15,000 on PyPI
fasttext-langdetectIdentifies the language of UTF-8 text using…
permissive · top 15,000 on PyPI
jiebaJieba segments Chinese text into words using…
permissive · top 5,000 on PyPI
razdelSplits Russian text into sentences and tokens…
permissive · top 15,000 on PyPI
gcld3Identifies the language of input text using a…
unclear · top 15,000 on PyPI
simplemmaSimplemma converts inflected word forms to…
permissive · top 15,000 on PyPI