This is a playground for the development of two new features.
It depends on Python library:
from unidecode import unidecode
import unicodedata
def make_transliteration(text):
return unidecode(text)
def remove_accents(text):
return ''.join(c for c in unicodedata.normalize('NFD', text) if unicodedata.category(c) != 'Mn')
# test with John 1:1
greek_text_with_accents = "ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος."
transliterated_text = make_transliteration(greek_text_with_accents)
unaccented_text= remove_accents(greek_text_with_accents)
print(transliterated_text) # in TF>0.5 use with: fmt='text-transliterated'
print(unaccented_text) # in TF>0.5 use with: fmt='text-unaccented'
print(greek_text_with_accents)
en arkhe en o logos, kai o logos en pros ton theon, kai theos en o logos. εν αρχη ην ο λογος, και ο λογος ην προς τον θεον, και θεος ην ο λογος. ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν, καὶ θεὸς ἦν ὁ λόγος.