--- id: sentence-stream version: "1.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # sentence-stream — A small sentence splitter for text streams License: permissive · Maintenance: active · Downloads: 375.2K/mo ## What it is and what it does Sentence Stream is a lightweight sentence splitter designed to handle text that arrives in arbitrary chunks—such as streaming responses from language models or network I/O—and reassemble them into complete sentences. Rather than requiring text to be buffered until word or sentence boundaries align, it processes chunks as they arrive and yields complete sentences when boundaries are detected. The package provides both synchronous (stream_to_sentences) and asynchronous (async_stream_to_sentences) interfaces, making it suitable for integration into streaming pipelines. It depends only on the regex library and supports Python 3.9 through 3.13, keeping installation friction minimal. Use it for: - Process streaming LLM responses to extract complete sentences as they arrive, without buffering entire outputs. - Split real-time chat or voice transcription streams into sentence units for downstream NLP processing. - Handle network-streamed text (e.g., HTTP chunked responses) and emit complete sentences incrementally. - Build sentence-aware streaming pipelines in async applications where text arrives in unpredictable fragment sizes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Splits text streams into sentences even when chunks arrive at arbitrary boundaries, with support for both synchronous and asynchronous iteration. Yes, if you need to split sentences from text that arrives in arbitrary chunks or streams. The low install friction, active maintenance, permissive license, and focused scope make it a straightforward addition to streaming pipelines. Not necessary if your text is already buffered or sentence-aligned. ## Install pip install sentence-stream uv add sentence-stream poetry add sentence-stream ## Installing sentence-stream Before you install: Low friction: pure Python wheel with a single runtime dependency (regex). Last commit 2026-08-11 and active maintenance status suggest the project is current. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install sentence-stream from sentence_stream import stream_to_sentences text_chunks = ["Hello world", ". This is", " a test."] sentences = list(stream_to_sentences(text_chunks)) # For async: from sentence_stream import async_stream_to_sentences Requires Python 3.9 or later. Verify before relying: - Whether regex dependency adds meaningful overhead or compatibility constraints beyond what sentence-stream itself requires. - Performance characteristics on very large streams or highly fragmented chunk boundaries. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 375.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sentence splitter streaming, text stream sentence boundary, split sentences from chunks, sentence tokenization streaming, async sentence splitting, sentence boundary detection, stream text to sentences, streaming, nlp [View on SkillFed](https://skillfed.io/packages/sentence-stream) · [View on PyPI](https://pypi.org/project/sentence-stream/)