Metadata-Version: 2.4 Name: sentence_stream Version: 1.2.0 Summary: A small sentence splitter for text streams Author-email: The Home Assistant Authors License: Apache-2.0 Project-URL: Source Code, http://github.com/OHF-Voice/sentence-stream Keywords: home,assistant,sentence boundary Platform: any Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers Classifier: Topic :: Text Processing :: Linguistic Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Requires-Python: >=3.9.0 Description-Content-Type: text/markdown License-File: LICENSE.md Requires-Dist: regex==2024.11.6 Provides-Extra: dev Requires-Dist: black==24.8.0; extra == "dev" Requires-Dist: flake8==7.2.0; extra == "dev" Requires-Dist: mypy==1.14.0; extra == "dev" Requires-Dist: pylint==3.2.7; extra == "dev" Requires-Dist: pytest==8.3.5; extra == "dev" Requires-Dist: pytest-asyncio==1.1.0; extra == "dev" Requires-Dist: tox==4.26.0; extra == "dev" Requires-Dist: build==1.2.2; extra == "dev" Dynamic: license-file # Sentence Stream A small sentence splitter for text streams. ## Install ``` sh pip install sentence-stream ``` ## Example ``` python from sentence_stream import stream_to_sentences text_chunks = [ "Text chunks that a", "re not on", " word or se", "ntence boundarie", "s. But, they w", "ill sti", "ll get sp", "lit right", "!!! Goo", "d", ] assert list(stream_to_sentences(text_chunks)) == [ "Text chunks that are not on word or sentence boundaries.", "But, they will still get split right!!!", "Good", ] ``` For async streams, use `async_stream_to_sentences`.