---
id: minisbd
version: "0.9.5"
license: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record)
license_treatment: agpl
maintenance: active
---
# minisbd — Free and open source library for fast sentence boundary detection
License: agpl · Maintenance: active · Downloads: 245.5K/mo
## 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 above — 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
pip install minisbd
uv add minisbd
poetry add minisbd
## Installing 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. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (agpl)
- Python support: supports_current
- Install friction: low
- Maintenance: active
- Downloads: 245.5K/month (top 15,000 on PyPI)
- Known vulnerabilities: none known
## Tags
sentence boundary detection, sentence segmentation, multilingual sentence splitting, SBD ONNX, fast sentence tokenization, language-aware sentence parsing, text to sentences, nlp, multilingual, onnx
[View on SkillFed](https://skillfed.io/packages/minisbd) · [View on PyPI](https://pypi.org/project/minisbd/)