Back to Dave Coffin's Home Page

Converting English text to Shavian script

To learn about the Shavian Alphabet, check out Shavian.info.

To transliterate English-language text files and web pages into Shavian script, I've written a C program, a Python program, and a dictionary used by both.

Note: This dictionary is intended as a guide to Shavian spelling, not orthodox spelling or usage. I've packed it with all sorts of ridiculous coinages and misspellings people use on the Internet these days, rendering their supposed pronunciations in Shavian.

To use shaw.c, do:

bunzip2 dave.dict.bz2
gcc -o shaw shaw.c
shaw dave.dict < english.txt
Or do "shaw dave.dict", type stuff on the screen, and press Enter.

For shaw.py you'll need Python version 3.5 or above and the Natural Language Toolkit:

bunzip2 dave.dict.bz2
pip3 install nltk
python3
>>> import nltk
>>> nltk.download('punkt')
>>> nltk.download('averaged_perceptron_tagger')
>>> exit()
python3 shaw.py dave.dict < english.txt
Because shaw.py runs the entire text through NLTK's part-of-speech tagger in one piece, you can't use it interactively. It outputs nothing until it receives end-of-file on input. The benefit of NLTK is that part-of-speech tagging resolves most heteronyms, e.g. "live" as an adjective is "๐‘ค๐‘ฒ๐‘" while as a verb it is "๐‘ค๐‘ฆ๐‘". shaw.c can't do this because NLTK doesn't support C.

Once you have shaw.py working, you can install a Firefox extension that automatically renders every website you visit in Shavian. At the command line do:

cd /usr/local/share
wget dechifro.org/shavian/extension.tgz
tar xvf extension.tgz
cd shavian
mv shavian.json /usr/lib/mozilla/native-messaging-hosts
wget dechifro.org/shavian/{shaw.py,dave.dict.bz2}
bunzip dave.dict.bz2
firefox about:debugging\#/runtime/this-firefox &
In Firefox, click "Load Temporary Add-on" and choose the file /usr/local/share/shavian/manifest.json. Every website you load will display normally for a second, then switch to Shavian. This continues until you either quit Firefox or right-click the "๐‘–๐‘ท" button and choose "Remove Extension".

Viewing Shavian text on a computer is generally not a problem anymore thanks to the beautiful Noto Sans Shavian font now installed by default in Linux. If for whatever reason you need a free monochrome bitmap font, I designed one here. Here's a sample text rendered with it:

I prefer to use such fonts with a white on dark slate gray color scheme. The same text in your web browser's default font looks like this:

๐‘ž ๐‘ฟ๐‘ฏ๐‘จ๐‘ฏ๐‘ฆ๐‘ฅ๐‘ฉ๐‘• ๐‘›๐‘ง๐‘’๐‘ค๐‘ผ๐‘ฑ๐‘–๐‘ฉ๐‘ฏ ๐‘ ๐‘ž ๐‘”๐‘ป๐‘‘๐‘ฐ๐‘ฏ ๐‘ฟ๐‘ฏ๐‘ฒ๐‘‘๐‘ฉ๐‘› ๐‘•๐‘‘๐‘ฑ๐‘‘๐‘• ๐‘ ยท๐‘ฉ๐‘ฅ๐‘ง๐‘ฎ๐‘ฆ๐‘’๐‘ฉ, ๐‘ข๐‘ง๐‘ฏ ๐‘ฆ๐‘ฏ ๐‘ž ๐‘’๐‘น๐‘• ๐‘ ๐‘ฃ๐‘ฟ๐‘ฅ๐‘ฉ๐‘ฏ ๐‘ฆ๐‘๐‘ง๐‘ฏ๐‘‘๐‘•, ๐‘ฆ๐‘‘ ๐‘š๐‘ฆ๐‘’๐‘ณ๐‘ฅ๐‘Ÿ ๐‘ฏ๐‘ง๐‘•๐‘ฉ๐‘•๐‘บ๐‘ฆ ๐‘“ ๐‘ข๐‘ณ๐‘ฏ ๐‘๐‘ฐ๐‘๐‘ฉ๐‘ค ๐‘‘ ๐‘›๐‘ฆ๐‘Ÿ๐‘ช๐‘ค๐‘ ๐‘ž ๐‘๐‘ฉ๐‘ค๐‘ฆ๐‘‘๐‘ฆ๐‘’๐‘ฉ๐‘ค ๐‘š๐‘จ๐‘ฏ๐‘›๐‘Ÿ ๐‘ข๐‘ฆ๐‘— ๐‘ฃ๐‘จ๐‘ ๐‘’๐‘ฉ๐‘ฏ๐‘ง๐‘’๐‘‘๐‘ฉ๐‘› ๐‘ž๐‘ง๐‘ฅ ๐‘ข๐‘ฆ๐‘ž ๐‘ฉ๐‘ฏ๐‘ณ๐‘ž๐‘ผ, ๐‘ฏ ๐‘‘ ๐‘ฉ๐‘•๐‘ฟ๐‘ฅ ๐‘ฉ๐‘ฅ๐‘ณ๐‘™ ๐‘ž ๐‘๐‘ฌ๐‘ผ๐‘Ÿ ๐‘ ๐‘ž ๐‘ป๐‘”, ๐‘ž ๐‘•๐‘ง๐‘๐‘ผ๐‘ฉ๐‘‘ ๐‘ฏ ๐‘ฐ๐‘’๐‘ข๐‘ฉ๐‘ค ๐‘•๐‘‘๐‘ฑ๐‘–๐‘ฉ๐‘ฏ ๐‘‘ ๐‘ข๐‘ฆ๐‘— ๐‘ž ๐‘ค๐‘ท๐‘Ÿ ๐‘ ๐‘ฏ๐‘ฑ๐‘—๐‘ผ ๐‘ฏ ๐‘ ๐‘ฏ๐‘ฑ๐‘—๐‘ผ'๐‘Ÿ ๐‘œ๐‘ช๐‘› ๐‘ฆ๐‘ฏ๐‘‘๐‘ฒ๐‘‘๐‘ฉ๐‘ค ๐‘ž๐‘ง๐‘ฅ, ๐‘ฉ ๐‘›๐‘ฐ๐‘•๐‘ฉ๐‘ฏ๐‘‘ ๐‘ฎ๐‘ฆ๐‘•๐‘๐‘ง๐‘’๐‘‘ ๐‘‘ ๐‘ž ๐‘ฉ๐‘๐‘ฆ๐‘ฏ๐‘˜๐‘ฉ๐‘ฏ๐‘Ÿ ๐‘ ๐‘ฅ๐‘จ๐‘ฏ๐‘’๐‘ฒ๐‘ฏ๐‘› ๐‘ฎ๐‘ฆ๐‘’๐‘ข๐‘ฒ๐‘ผ๐‘Ÿ ๐‘ž๐‘จ๐‘‘ ๐‘ž๐‘ฑ ๐‘–๐‘ซ๐‘› ๐‘›๐‘ฆ๐‘’๐‘ค๐‘บ ๐‘ž ๐‘’๐‘ท๐‘Ÿ๐‘ฉ๐‘Ÿ ๐‘ข๐‘ฆ๐‘— ๐‘ฆ๐‘ฅ๐‘๐‘ง๐‘ค ๐‘ž๐‘ง๐‘ฅ ๐‘‘ ๐‘ž ๐‘•๐‘ง๐‘๐‘ผ๐‘ฑ๐‘–๐‘ฉ๐‘ฏ.

๐‘ข๐‘ฐ ๐‘ฃ๐‘ด๐‘ค๐‘› ๐‘ž๐‘ฐ๐‘Ÿ ๐‘‘๐‘ฎ๐‘ต๐‘ž๐‘Ÿ ๐‘‘ ๐‘š๐‘ฐ ๐‘•๐‘ง๐‘ค๐‘“-๐‘ง๐‘๐‘ฆ๐‘›๐‘ฉ๐‘ฏ๐‘‘, ๐‘ž๐‘จ๐‘‘ ๐‘ท๐‘ค ๐‘ฅ๐‘ง๐‘ฏ ๐‘ธ ๐‘’๐‘ฎ๐‘ฆ๐‘ฑ๐‘‘๐‘ฉ๐‘› ๐‘ฐ๐‘’๐‘ข๐‘ฉ๐‘ค, ๐‘ž๐‘จ๐‘‘ ๐‘ž๐‘ฑ ๐‘ธ ๐‘ฆ๐‘ฏ๐‘›๐‘ฌ๐‘› ๐‘š๐‘ฒ ๐‘ž๐‘บ ๐‘’๐‘ฎ๐‘ฆ๐‘ฑ๐‘‘๐‘ผ ๐‘ข๐‘ฆ๐‘ž ๐‘•๐‘ป๐‘‘๐‘ฉ๐‘ฏ ๐‘ณ๐‘ฏ๐‘ฑ๐‘ค๐‘พ๐‘ฏ๐‘ฉ๐‘š๐‘ฉ๐‘ค ๐‘ฎ๐‘ฒ๐‘‘๐‘•, ๐‘ž๐‘จ๐‘‘ ๐‘ฉ๐‘ฅ๐‘ณ๐‘™ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘ธ ๐‘ค๐‘ฒ๐‘“, ๐‘ค๐‘ฆ๐‘š๐‘ผ๐‘‘๐‘ฆ ๐‘ฏ ๐‘ž ๐‘๐‘ผ๐‘•๐‘ฟ๐‘‘ ๐‘ ๐‘ฃ๐‘จ๐‘๐‘ฆ๐‘ฏ๐‘ฉ๐‘•.--๐‘ž๐‘จ๐‘‘ ๐‘‘ ๐‘•๐‘ฆ๐‘’๐‘˜๐‘ซ๐‘ผ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘ฎ๐‘ฒ๐‘‘๐‘•, ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘๐‘• ๐‘ธ ๐‘ฆ๐‘ฏ๐‘•๐‘‘๐‘ฆ๐‘‘๐‘ฟ๐‘‘๐‘ฉ๐‘› ๐‘ฉ๐‘ฅ๐‘ณ๐‘™ ๐‘ฅ๐‘ง๐‘ฏ, ๐‘›๐‘ฆ๐‘ฎ๐‘ฒ๐‘๐‘ฆ๐‘™ ๐‘ž๐‘บ ๐‘ก๐‘ณ๐‘•๐‘‘ ๐‘๐‘ฌ๐‘ผ๐‘Ÿ ๐‘“๐‘ฎ๐‘ช๐‘ฅ ๐‘ž ๐‘’๐‘ฉ๐‘ฏ๐‘•๐‘ง๐‘ฏ๐‘‘ ๐‘ ๐‘ž ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘›, --๐‘ž๐‘จ๐‘‘ ๐‘ข๐‘ง๐‘ฏ๐‘ง๐‘๐‘ผ ๐‘ง๐‘ฏ๐‘ฆ ๐‘“๐‘น๐‘ฅ ๐‘ ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘ ๐‘š๐‘ฆ๐‘’๐‘ณ๐‘ฅ๐‘Ÿ ๐‘›๐‘ฆ๐‘•๐‘‘๐‘ฎ๐‘ณ๐‘’๐‘‘๐‘ฆ๐‘ ๐‘ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘ง๐‘ฏ๐‘›๐‘Ÿ, ๐‘ฆ๐‘‘ ๐‘ฆ๐‘Ÿ ๐‘ž ๐‘ฎ๐‘ฒ๐‘‘ ๐‘ ๐‘ž ๐‘๐‘ฐ๐‘๐‘ฉ๐‘ค ๐‘‘ ๐‘ท๐‘ค๐‘‘๐‘ผ ๐‘น ๐‘‘ ๐‘ฉ๐‘š๐‘ช๐‘ค๐‘ฆ๐‘– ๐‘ฆ๐‘‘, ๐‘ฏ ๐‘‘ ๐‘ฆ๐‘ฏ๐‘•๐‘‘๐‘ฆ๐‘‘๐‘ฟ๐‘‘ ๐‘ฏ๐‘ฟ ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘, ๐‘ค๐‘ฑ๐‘ฆ๐‘™ ๐‘ฆ๐‘‘๐‘• ๐‘“๐‘ฌ๐‘ฏ๐‘›๐‘ฑ๐‘–๐‘ฉ๐‘ฏ ๐‘ช๐‘ฏ ๐‘•๐‘ณ๐‘— ๐‘๐‘ฎ๐‘ฆ๐‘ฏ๐‘•๐‘ฉ๐‘๐‘ฉ๐‘ค๐‘Ÿ ๐‘ฏ ๐‘น๐‘œ๐‘ฉ๐‘ฏ๐‘ฒ๐‘Ÿ๐‘ฆ๐‘™ ๐‘ฆ๐‘‘๐‘• ๐‘๐‘ฌ๐‘ผ๐‘Ÿ ๐‘ฆ๐‘ฏ ๐‘•๐‘ณ๐‘— ๐‘“๐‘น๐‘ฅ, ๐‘จ๐‘Ÿ ๐‘‘ ๐‘ž๐‘ง๐‘ฅ ๐‘–๐‘จ๐‘ค ๐‘•๐‘ฐ๐‘ฅ ๐‘ฅ๐‘ด๐‘•๐‘‘ ๐‘ค๐‘ฒ๐‘’๐‘ค๐‘ฆ ๐‘‘ ๐‘ฆ๐‘“๐‘ง๐‘’๐‘‘ ๐‘ž๐‘บ ๐‘•๐‘ฑ๐‘“๐‘‘๐‘ฆ ๐‘ฏ ๐‘ฃ๐‘จ๐‘๐‘ฆ๐‘ฏ๐‘ฉ๐‘•. ๐‘๐‘ฎ๐‘ต๐‘›๐‘ฉ๐‘ฏ๐‘•, ๐‘ฆ๐‘ฏ๐‘›๐‘ฐ๐‘›, ๐‘ข๐‘ฆ๐‘ค ๐‘›๐‘ฆ๐‘’๐‘‘๐‘ฑ๐‘‘ ๐‘ž๐‘จ๐‘‘ ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘๐‘• ๐‘ค๐‘ช๐‘™ ๐‘ฆ๐‘•๐‘‘๐‘จ๐‘š๐‘ค๐‘ฆ๐‘–๐‘‘ ๐‘–๐‘ซ๐‘› ๐‘ฏ๐‘ช๐‘‘ ๐‘š๐‘ฐ ๐‘—๐‘ฑ๐‘ฏ๐‘ก๐‘› ๐‘“ ๐‘ค๐‘ฒ๐‘‘ ๐‘ฏ ๐‘‘๐‘ฎ๐‘จ๐‘ฏ๐‘Ÿ๐‘พ๐‘ฏ๐‘‘ ๐‘’๐‘ท๐‘Ÿ๐‘ฉ๐‘Ÿ; ๐‘ฏ ๐‘ฉ๐‘’๐‘น๐‘›๐‘ฆ๐‘™๐‘ค๐‘ฆ ๐‘ท๐‘ค ๐‘ฆ๐‘’๐‘•๐‘๐‘ฝ๐‘พ๐‘ฏ๐‘• ๐‘ฃ๐‘จ๐‘” ๐‘–๐‘ด๐‘ฏ, ๐‘ž๐‘จ๐‘‘ ๐‘ฅ๐‘จ๐‘ฏ๐‘’๐‘ฒ๐‘ฏ๐‘› ๐‘ธ ๐‘ฅ๐‘น ๐‘›๐‘ฆ๐‘•๐‘๐‘ด๐‘Ÿ๐‘› ๐‘‘ ๐‘•๐‘ณ๐‘“๐‘ผ, ๐‘ข๐‘ฒ๐‘ค ๐‘ฐ๐‘๐‘ฉ๐‘ค๐‘Ÿ ๐‘ธ ๐‘•๐‘ณ๐‘“๐‘ผ๐‘ฉ๐‘š๐‘ฉ๐‘ค, ๐‘ž๐‘จ๐‘ฏ ๐‘‘ ๐‘ฎ๐‘ฒ๐‘‘ ๐‘ž๐‘ง๐‘ฅ๐‘•๐‘ง๐‘ค๐‘๐‘Ÿ ๐‘š๐‘ฒ ๐‘ฉ๐‘š๐‘ช๐‘ค๐‘ฆ๐‘–๐‘ฆ๐‘™ ๐‘ž ๐‘“๐‘น๐‘ฅ๐‘Ÿ ๐‘‘ ๐‘ข๐‘ฆ๐‘— ๐‘ž๐‘ฑ ๐‘ธ ๐‘ฉ๐‘’๐‘ณ๐‘•๐‘‘๐‘ฉ๐‘ฅ๐‘›. ๐‘š๐‘ณ๐‘‘ ๐‘ข๐‘ง๐‘ฏ ๐‘ฉ ๐‘ค๐‘ช๐‘™ ๐‘‘๐‘ฎ๐‘ฑ๐‘ฏ ๐‘ ๐‘ฉ๐‘š๐‘ฟ๐‘•๐‘ฉ๐‘Ÿ ๐‘ฏ ๐‘ฟ๐‘Ÿ๐‘ป๐‘๐‘ฑ๐‘–๐‘ฉ๐‘ฏ๐‘Ÿ, ๐‘๐‘ผ๐‘•๐‘ฟ๐‘ฆ๐‘™ ๐‘ฆ๐‘ฏ๐‘๐‘บ๐‘พ๐‘š๐‘ค๐‘ฆ ๐‘ž ๐‘•๐‘ฑ๐‘ฅ ๐‘ช๐‘š๐‘ก๐‘ง๐‘’๐‘‘ ๐‘ฆ๐‘๐‘ฆ๐‘ฏ๐‘•๐‘ฉ๐‘Ÿ ๐‘ฉ ๐‘›๐‘ฆ๐‘Ÿ๐‘ฒ๐‘ฏ ๐‘‘ ๐‘ฎ๐‘ฆ๐‘›๐‘ฟ๐‘• ๐‘ž๐‘ง๐‘ฅ ๐‘ณ๐‘ฏ๐‘›๐‘ผ ๐‘จ๐‘š๐‘•๐‘ฉ๐‘ค๐‘ต๐‘‘ ๐‘›๐‘ง๐‘•๐‘๐‘ฉ๐‘‘๐‘ฆ๐‘Ÿ๐‘ฉ๐‘ฅ, ๐‘ฆ๐‘‘ ๐‘ฆ๐‘Ÿ ๐‘ž๐‘บ ๐‘ฎ๐‘ฒ๐‘‘, ๐‘ฆ๐‘‘ ๐‘ฆ๐‘Ÿ ๐‘ž๐‘บ ๐‘›๐‘ฟ๐‘‘๐‘ฆ, ๐‘‘ ๐‘”๐‘ฎ๐‘ด ๐‘ช๐‘“ ๐‘•๐‘ณ๐‘— ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘, ๐‘ฏ ๐‘‘ ๐‘๐‘ฎ๐‘ฉ๐‘๐‘ฒ๐‘› ๐‘ฏ๐‘ฟ ๐‘œ๐‘ธ๐‘›๐‘Ÿ ๐‘“ ๐‘ž๐‘บ ๐‘“๐‘ฟ๐‘—๐‘ผ ๐‘•๐‘ฆ๐‘’๐‘˜๐‘ซ๐‘ผ๐‘ฆ๐‘‘๐‘ฆ.--๐‘•๐‘ณ๐‘— ๐‘ฃ๐‘จ๐‘Ÿ ๐‘š๐‘ฐ๐‘ฏ ๐‘ž ๐‘๐‘ฑ๐‘–๐‘ฉ๐‘ฏ๐‘‘ ๐‘•๐‘ณ๐‘“๐‘ผ๐‘ฉ๐‘ฏ๐‘• ๐‘ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘’๐‘ช๐‘ค๐‘ฉ๐‘ฏ๐‘ฆ๐‘Ÿ; ๐‘ฏ ๐‘•๐‘ณ๐‘— ๐‘ฆ๐‘Ÿ ๐‘ฏ๐‘ฌ ๐‘ž ๐‘ฏ๐‘ฆ๐‘•๐‘ง๐‘•๐‘ฆ๐‘‘๐‘ฆ ๐‘ข๐‘ฆ๐‘— ๐‘’๐‘ฉ๐‘ฏ๐‘•๐‘‘๐‘ฎ๐‘ฑ๐‘ฏ๐‘Ÿ ๐‘ž๐‘ง๐‘ฅ ๐‘‘ ๐‘ท๐‘ค๐‘‘๐‘ผ ๐‘ž๐‘บ ๐‘“๐‘น๐‘ฅ๐‘ผ ๐‘•๐‘ฆ๐‘•๐‘‘๐‘ฉ๐‘ฅ๐‘Ÿ ๐‘ ๐‘œ๐‘ณ๐‘๐‘ผ๐‘ฏ๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘. ๐‘ž ๐‘ฃ๐‘ฆ๐‘•๐‘‘๐‘ผ๐‘ฆ ๐‘ ๐‘ž ๐‘๐‘ฎ๐‘ง๐‘Ÿ๐‘ฉ๐‘ฏ๐‘‘ ๐‘’๐‘ฆ๐‘™ ๐‘ ๐‘œ๐‘ฎ๐‘ฑ๐‘‘ ยท๐‘š๐‘ฎ๐‘ฆ๐‘‘๐‘ฉ๐‘ฏ ๐‘ฆ๐‘Ÿ ๐‘ฉ ๐‘ฃ๐‘ฆ๐‘•๐‘‘๐‘ผ๐‘ฆ ๐‘ ๐‘ฎ๐‘ฆ๐‘๐‘ฐ๐‘‘๐‘ฉ๐‘› ๐‘ฆ๐‘ฏ๐‘ก๐‘ผ๐‘ฆ๐‘Ÿ ๐‘ฏ ๐‘ฟ๐‘Ÿ๐‘ป๐‘๐‘ฑ๐‘–๐‘ฉ๐‘ฏ๐‘Ÿ, ๐‘ท๐‘ค ๐‘ฃ๐‘จ๐‘๐‘ฆ๐‘™ ๐‘ฆ๐‘ฏ ๐‘›๐‘ฆ๐‘ฎ๐‘ง๐‘’๐‘‘ ๐‘ช๐‘š๐‘ก๐‘ง๐‘’๐‘‘ ๐‘ž ๐‘ฆ๐‘•๐‘‘๐‘จ๐‘š๐‘ค๐‘ฆ๐‘–๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘ ๐‘ ๐‘ฉ๐‘ฏ ๐‘จ๐‘š๐‘•๐‘ฉ๐‘ค๐‘ต๐‘‘ ๐‘‘๐‘ฆ๐‘ฎ๐‘ฉ๐‘ฏ๐‘ฆ ๐‘ด๐‘๐‘ผ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘•๐‘‘๐‘ฑ๐‘‘๐‘•. ๐‘‘ ๐‘๐‘ฎ๐‘ต๐‘ ๐‘ž๐‘ฆ๐‘•, ๐‘ค๐‘ง๐‘‘ ๐‘“๐‘จ๐‘’๐‘‘๐‘• ๐‘š๐‘ฐ ๐‘•๐‘ฉ๐‘š๐‘ฅ๐‘ฆ๐‘‘๐‘ฉ๐‘› ๐‘‘ ๐‘ฉ ๐‘’๐‘จ๐‘ฏ๐‘›๐‘ฆ๐‘› ๐‘ข๐‘ป๐‘ค๐‘›.