A small sentence splitter for text streams
Project description
Sentence Stream
A small sentence splitter for text streams.
Install
pip install sentence-stream
Example
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentence_stream-1.2.1.tar.gz.
File metadata
- Download URL: sentence_stream-1.2.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
427ed158a17294df3a3b5a1dce283faf9ae0cd4fe93efac0528b107002b99a47
|
|
| MD5 |
687dc2e23d289e3be2d5033c9a594dae
|
|
| BLAKE2b-256 |
48563e5cf7cb3e8418ec2041535d3f81b718dcca31d0d5be0630b5f8bc4c5558
|
Provenance
The following attestation bundles were made for sentence_stream-1.2.1.tar.gz:
Publisher:
publish.yml on OHF-Voice/sentence-stream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sentence_stream-1.2.1.tar.gz -
Subject digest:
427ed158a17294df3a3b5a1dce283faf9ae0cd4fe93efac0528b107002b99a47 - Sigstore transparency entry: 609911750
- Sigstore integration time:
-
Permalink:
OHF-Voice/sentence-stream@f97a0a560dbec7b3a8bfed2a624d9f2584feb81c -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/OHF-Voice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f97a0a560dbec7b3a8bfed2a624d9f2584feb81c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sentence_stream-1.2.1-py3-none-any.whl.
File metadata
- Download URL: sentence_stream-1.2.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a925a52322545dff19991247edd1c7b88dfb9bcd5013e09a50a280a3199bb796
|
|
| MD5 |
36650be09dd52ca9b6ca776a5bf0d72d
|
|
| BLAKE2b-256 |
434d2570aa15f43c4faf8c5a3e0d6ed5cb265af13c8b66cd408c970bd6aa0177
|
Provenance
The following attestation bundles were made for sentence_stream-1.2.1-py3-none-any.whl:
Publisher:
publish.yml on OHF-Voice/sentence-stream
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sentence_stream-1.2.1-py3-none-any.whl -
Subject digest:
a925a52322545dff19991247edd1c7b88dfb9bcd5013e09a50a280a3199bb796 - Sigstore transparency entry: 609911822
- Sigstore integration time:
-
Permalink:
OHF-Voice/sentence-stream@f97a0a560dbec7b3a8bfed2a624d9f2584feb81c -
Branch / Tag:
refs/tags/v1.2.1 - Owner: https://github.com/OHF-Voice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f97a0a560dbec7b3a8bfed2a624d9f2584feb81c -
Trigger Event:
push
-
Statement type: