Fun Sentence Splitter
A fundamental sentence splitter based on spacy.
Usage
from fun_sentence_splitter import init
splitter = init(spacy_model="de_core_news_sm")
for sentence in splitter("Das ist ein Satz. Und hier noch einer!"):
print(sentence.text, sentence.span)
init(...) returns a splitter function. Each Sentence exposes .text and .span (a (start, end) index pair into the original text).
Split on line breaks first (e.g. for structured documents) and only run spaCy on longer lines:
splitter = init(
spacy_model="de_core_news_sm",
always_split_on_line_breaks=True,
max_len_before_split=100,
)
Download the language model once:
uv run python -m spacy download de_core_news_sm
Requirements
uv.
Local Dev Setup
Install dependencies and download the Spacy language model used in the tests:
uv sync
uv run python -m spacy download de_core_news_sm
Run static checks and tests:
uv run ruff check .
uv run mypy .
uv run pytest --cov=fun_sentence_splitter
Run Evaluation
./evaluate.sh path/to/splits_dir
path/to/splits_dir: directory containing pairs of *.split and *.txt files. .split files contain the expected
sentences, each on a separate line. .txt files contain the original text to split.
The evaluation script will automatically update the spacy dependency and download the required language models.
Metadata
Release files for fun-sentence-splitter 0.7.3816.20261030
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fun_sentence_splitter-0.7.3816.20261030.tar.gz | 59.9 kB | Without provenance | Details for fun_sentence_splitter-0.7.3816.20261030.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fun_sentence_splitter-0.7.3816.20261030-py3-none-any.whl | Python 3 | none | any | Details for fun_sentence_splitter-0.7.3816.20261030-py3-none-any.whl |
Total release size: 64.2 kB
Release files / fun_sentence_splitter-0.7.3816.20261030.tar.gz
| Download URL | fun_sentence_splitter-0.7.3816.20261030.tar.gz |
|---|---|
| Size | 59.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e56ab0bb38dc0a08adc50680824cdbb950f01ab61911fda84f641d4ba662c5b2
|
|
BLAKE2b-256 checksum How to use checksums |
69a98cf43dc4461e7e9c8f64ff49804f114d72aacda56c489ef563d33781e375
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fun_sentence_splitter-0.7.3816.20261030-py3-none-any.whl
| Download URL | fun_sentence_splitter-0.7.3816.20261030-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eaff945fade45a357ab631e35a59ee2b8254754766143dcc3d2d69bc3e9235b6
|
|
BLAKE2b-256 checksum How to use checksums |
363a0943bd484c188dc95b09e6837cc8be77378d14f7c6c8a87a908525fa0cb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for fun-sentence-splitter 0.7.3816.20261030
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.