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.

Metadata

Release files for theworker02-shakespy 1.0.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 theworker02-shakespy 1.0.0
File Size Uploaded Provenance
theworker02_shakespy-1.0.0.tar.gz 18.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for theworker02-shakespy 1.0.0
File Interpreter ABI Platform
theworker02_shakespy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / theworker02_shakespy-1.0.0.tar.gz

Download URL theworker02_shakespy-1.0.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cf528bc2171ad324dd82c3e82a3dd6ff12bcb6af6fa3a2691d936c418943183b
BLAKE2b-256 checksum
How to use checksums
ce30ae06573bc03e24e81f8efc7c7403487e4f96ae1f0db1cfd366cc632027b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / theworker02_shakespy-1.0.0-py3-none-any.whl

Download URL theworker02_shakespy-1.0.0-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
600e7b68852f164a4a4a211d76893a3c65f4d417b5da5a1c8f714f50af2fc908
BLAKE2b-256 checksum
How to use checksums
9b31c723c3e5aa7ffb64510d1aeccf56ad8c76bbe1d4a726a0391ec753082de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for theworker02-shakespy 1.0.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.0.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