SNES — Simple Narrative Edge Segmenter
ModernBERT-based scene/chapter boundary detector for narrative text.
SNES predicts paragraph-level transitions (edges) in long-form documents using an encoder with 8k token context.
Install
pip install -e .
Requires Python 3.10+ and the dependencies listed in pyproject.toml.
Quick Start
Train:
snes-train --train_file data/train.jsonl --val_file data/val.jsonl \
--model_name answerdotai/ModernBERT-base \
--output_dir ./snes_model \
--epochs 3 --lr 2e-5 --batch_size 1 \
--max_length 8192
Evaluate:
snes-eval --model ./snes_model --data data/test.jsonl
Infer:
snes-infer story.txt --threshold 0.35 --output scene_breaks.json
Data Format (.jsonl)
Each record is one story pre-split into paragraphs:
{"story_id": "uuid-1234", "paragraphs": ["Para 1", "Para 2"], "labels": [0, 1]}
Optional keys: soft_labels, meta.
License
MIT
Metadata
Release files for snes 0.0.1
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 |
|---|---|---|---|---|
| snes-0.0.1.tar.gz | 10.0 kB | Without provenance | Details for snes-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snes-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for snes-0.0.1-py3-none-any.whl |
Total release size: 21.7 kB
Release files / snes-0.0.1.tar.gz
| Download URL | snes-0.0.1.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24ebf849d40b50f1bfee4361329d1ee4913fc7b3ff36f6cc27cb3e3733812760
|
|
BLAKE2b-256 checksum How to use checksums |
37b12a4efb435fa3285c2538257ef9d8291396d5d27d3590a0da1de0e1ca0cfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / snes-0.0.1-py3-none-any.whl
| Download URL | snes-0.0.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
180b7b70b4ea7413b7f2f25f600e105bd064889001a7b36cd0bc966999e71673
|
|
BLAKE2b-256 checksum How to use checksums |
9f5f5bbdfcd5400298f9d233a4baa5bb6129464ac5a7834d7d59359dbe529b0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Security for snes 0.0.1
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.