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

Download files

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

Source Distribution

magnexis_shakespy-1.1.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

magnexis_shakespy-1.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file magnexis_shakespy-1.1.0.tar.gz.

File metadata

  • Download URL: magnexis_shakespy-1.1.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for magnexis_shakespy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b8c9da88fd873892ec05080592d7f1b61ca1630c1703489f90928a57235ec4ce
MD5 1b405bbbddd4e4202e0ff0048557e48b
BLAKE2b-256 ef2738ca09afed49b313245634c05b1a01cb98f4a349c8142639f862daf861b1

See more details on using hashes here.

File details

Details for the file magnexis_shakespy-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for magnexis_shakespy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ac77f199daf149367fd0c427bda87a252c9a14e594bc3dfd1723d4b4cb38ecc
MD5 0138a5f415cf23a1d7a9883831ee3739
BLAKE2b-256 e0817eba7738c25c6796a653209a2e2c71df9cb0328887d6b2840e5116de83c0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 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