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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penelopy-0.1.0.tar.gz (256.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penelopy-0.1.0-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file penelopy-0.1.0.tar.gz.

File metadata

  • Download URL: penelopy-0.1.0.tar.gz
  • Upload date:
  • Size: 256.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for penelopy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29fb8927f57abc646b156e2b5288642a50af3e37cc0e639874516198de4fd6a6
MD5 2a82b5f1412afa00353096f73fd9593f
BLAKE2b-256 43322130945c3f3b9221f5cba4aa1419fd249128c2342d09e9649f929e2cc891

See more details on using hashes here.

File details

Details for the file penelopy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: penelopy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for penelopy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef90ced0554c9789549bb3d393c3fc037bbb710a92c5ddd20ade2d29e258f7a4
MD5 6326f31540b037f78343b689b8696561
BLAKE2b-256 dbde6f98cade0a731283ba6283d2a97a902435c977ffd705ad2f78980772b4fe

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page