Skip to main content

Unidecode with medieval flavor

Project description


Transliterate Unicode text into plain 7-bit ASCII with Medieval flavor.

from mufidecode import mufidecode
from unidecode import unidecode

string = " soffroient Torm̃z⁊"
assert unidecode(string) == " soffroient Tormz7"  # Lostfirst character, et is converted to seven.
assert mufidecode(string) == "et soffroient Tormzet"
assert mufidecode(string, join=False) == ('et', ' ', 's', 'o', 'f', 'f', 'r', 'o', 'i', 'e', 'n', 't', ' ', 'T', 'o', 'r', 'm', 'z', 'et')

assert mufidecode("ꝮꝯꝮꝯ") == "usususus"

Add a new token

1. Get the code

string = "ꝯ"
print((ord(string) >> 8, ord(string) % 256))
# (167, 111)

2. Add the code to MUFI

MUFI[(167, 111)] = "us"  # Accepted transliteration

3. Pull Request

4. Enjoy

Project details

Download files

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

Files for mufidecode, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size mufidecode-0.1.0.tar.gz (16.2 kB) File type Source Python version None Upload date Hashes View
Filename, size mufidecode-0.1.0-py2.py3-none-any.whl (27.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page