Skip to main content

ShakesPy

Python Build Tests License

ShakesPy is a lightweight Python library and CLI for translating Modern English into a playful Early Modern English style inspired by Shakespeare and the King James Bible.

ShakesPy combines spaCy-powered grammatical analysis with phrase and vocabulary remapping to produce translations that feel more intentionally Shakespearean than a simple word-for-word replacer.

Features

  • spaCy-powered grammatical rewrites for subject/object pronouns
  • Smarter second-person verb conjugation such as you are -> thou art
  • Auxiliary handling for forms such as you will find -> thou wilt find
  • Expanded lexical and phrase replacements such as good morning -> good morrow
  • Simple command-line interface

Why ShakesPy

  • Distinguishes subject and object you so You know me and I know you do not translate the same way
  • Uses dependency parsing to conjugate second-person verbs more naturally
  • Supports both programmatic use and a small CLI for quick translations
  • Ships as a single Flit-packaged Python library with a focused API

Installation

Install from source for local development:

pip install -e .
python -m spacy download en_core_web_sm

Or install the project with Flit:

flit install --symlink
python -m spacy download en_core_web_sm

Usage

from shakespy import translate

print(translate("You are making a mistake."))
print(translate("You will find your answer before night."))
print(translate("Good morning, please wait."))
shakespy "You are making a mistake."
python -m shakespy.cli "Hello! I want to help you."
python -m shakespy.cli "Good morning, please wait."

Example outputs:

  • You are making a mistake. -> Thou art making a mistake.
  • You will find your answer before night. -> Thou wilt find thine answer ere night.
  • I want to help you. -> I desire to help thee.
  • Good morning, please wait. -> Good morrow, prithee bide.

Development

pip install -e .[dev]
python -m spacy download en_core_web_sm
python -m pytest
flit build

Notes

The translator uses a two-tier pipeline:

  1. spaCy dependency parsing for grammatical rules
  2. Regex-based phrase and lexical replacements for broader stylistic coverage

License

This project is licensed under the Apache License 2.0. See LICENSE.

Main Link

Visit shakespy

Metadata

Release files for magnexis-shakespy 1.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 magnexis-shakespy 1.1.0
File Size Uploaded Provenance
magnexis_shakespy-1.1.0.tar.gz 17.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for magnexis-shakespy 1.1.0
File Interpreter ABI Platform
magnexis_shakespy-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.6 kB

Release files / magnexis_shakespy-1.1.0.tar.gz

Download URL magnexis_shakespy-1.1.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b8c9da88fd873892ec05080592d7f1b61ca1630c1703489f90928a57235ec4ce
BLAKE2b-256 checksum
How to use checksums
ef2738ca09afed49b313245634c05b1a01cb98f4a349c8142639f862daf861b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / magnexis_shakespy-1.1.0-py3-none-any.whl

Download URL magnexis_shakespy-1.1.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ac77f199daf149367fd0c427bda87a252c9a14e594bc3dfd1723d4b4cb38ecc
BLAKE2b-256 checksum
How to use checksums
e0817eba7738c25c6796a653209a2e2c71df9cb0328887d6b2840e5116de83c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for magnexis-shakespy 1.1.0

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

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