Skip to main content

PENelopy

Pre-editorial normalization toolkit for Latin and Old French: a model-agnostic encapsulator around seq2seq normalizer models (currently comma-project/normalization-byt5-small), plus a character-level aligner that maps normalized output back onto the original text to produce TEI standoff XML and W3C Open Annotation JSON.

Install

uv add penelopy
# or, for the ONNX/quantized backend:
uv add "penelopy[onnx]"

CLI

penelopy normalize input.txt --model comma-project/normalization-byt5-small
penelopy quantize --model comma-project/normalization-byt5-small --output .cache/onnx --quantize
penelopy evaluate predictions.txt references.txt
penelopy align "tãt.⁊si" "tant et si"

# Or normalize via any OpenAI-compatible chat server (e.g. LM Studio):
penelopy normalize input.txt --backend lmstudio --model google/gemma-4-12b \
  --base-url http://localhost:1234/v1 --no-think

Library

from penelopy.models import load_model
from penelopy.pipeline import normalize_document

model = load_model("comma-project/normalization-byt5-small")
result = normalize_document("tãt.⁊si lamoit", model)
print(result.tei)
print(result.annotations)

See the full developer documentation, including the module architecture, at https://ponteineptique.github.io/PENelopy/.

License

Mozilla Public License 2.0.

Metadata

Release files for penelopy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for penelopy 0.1.0
File Size Uploaded
penelopy-0.1.0.tar.gz 256.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for penelopy 0.1.0
File Interpreter ABI Platform
penelopy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 307.4 kB

Release files / penelopy-0.1.0.tar.gz

Download URL penelopy-0.1.0.tar.gz
Size 256.0 kB
Tags Source
SHA-256 checksum
How to use checksums
29fb8927f57abc646b156e2b5288642a50af3e37cc0e639874516198de4fd6a6
BLAKE2b-256 checksum
How to use checksums
43322130945c3f3b9221f5cba4aa1419fd249128c2342d09e9649f929e2cc891
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / penelopy-0.1.0-py3-none-any.whl

Download URL penelopy-0.1.0-py3-none-any.whl
Size 51.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef90ced0554c9789549bb3d393c3fc037bbb710a92c5ddd20ade2d29e258f7a4
BLAKE2b-256 checksum
How to use checksums
dbde6f98cade0a731283ba6283d2a97a902435c977ffd705ad2f78980772b4fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page