Converts polytonic to monotonic.
Uses tkinter for the interface. If you don't need it, just run poly2mono in poly2mono.py
directly onto your text.
Requires tkinter so you may have to pip install tk
.
python3 main.py
for the window interface, as shown in the picture.python3 test.py
for the unittests.python3 utils/create_dictionary.py
to update the current dictionary.
The whole program is nothing but a chained replacement of key value pairs dumped in dictionary.json.
The building process is based on the insertion order of the final dictionary:
- Treat special cases that require spirits
- Remove spirits
- Remove accents from monosyllables (lots of case by case)
By the end, the final dictionary is of the form:
- Regex: intended substitution. Ex: '\bΣτής\b': 'Στης'