Unidecode with medieval flavor
Project description
Mufidecode
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mufidecode-0.0.5.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for mufidecode-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc0ed8e462c21b227fdfca3cc39c061c6465526d3c78cae8b82d8d292aadcadd |
|
MD5 | 820f467a6a1dbbb2140e5da09601a58a |
|
BLAKE2b-256 | 887f950c9945309b846176f9cde30036aaba7e624cd3e326b2efe0f2d627c451 |