Simple Estonian dictionary application
Sources
Estonian word basic forms sorted by ECTS levels: Vocabulary
Initial work
To obtain basic forms of the verbs we extract all word with their types and levels to a text file and convert to python dictionary and slightly rearange.
import csv
eesti_dict = {}
with open('/mnt/c/Users/Ritum/Downloads/EKI_etLex2.txt', 'r') as file:
reader = csv.reader(file, delimiter = '\t')
for row in reader:
row.insert(1, 1)
eesti_dict[row[0]] = [row[1:]]
import pickle
with open('eesti_dict.pickle', 'wb') as handle:
pickle.dump(eesti_dict, handle, protocol=pickle.HIGHEST_PROTOCOL)
with open('eesti_dict.pickle', 'rb') as handle:
b = pickle.load(handle)
b
Resulting dictionary, in this case with dictionary first entry we indicate basic form with 1, allowing us to append inflections without worrying about homonyms:
'aabits': [[1, 'nimisõna', 'B1']],
'aade': [[1, 'nimisõna', 'C1']],
'aadlik': [[1, 'nimisõna', 'C1']],
'aadress': [[1, 'nimisõna', 'A1']],
'aare': [[1, 'nimisõna', 'C1']],
...
Current result
