feat: Don't forget about the adverbs
This commit is contained in:
@@ -7,6 +7,7 @@ import pymongo
|
||||
TYPE_NOUNS = 0
|
||||
TYPE_VERBS = 1
|
||||
TYPE_ADJECTIVES = 2
|
||||
TYPE_ADVERB = 3
|
||||
|
||||
PATH_TO_VOCAB = "../data/vocab"
|
||||
|
||||
@@ -92,7 +93,14 @@ def csv_to_vocab(filename, type, from_id):
|
||||
|
||||
latin["endung_f"] = endung_f
|
||||
latin["endung_n"] = endung_n
|
||||
|
||||
elif (type == TYPE_ADVERB):
|
||||
# Adverb
|
||||
bedeutungen = [row[1]]
|
||||
if (row[2] != ""):
|
||||
bedeutungen.append(row[2])
|
||||
if (row[3] != ""):
|
||||
bedeutungen.append(row[3])
|
||||
|
||||
# TODO: Hints and mnemonics
|
||||
vocab.append({
|
||||
"id": id,
|
||||
@@ -130,6 +138,11 @@ adj, last_id = csv_to_vocab("Adjektive.csv", TYPE_ADJECTIVES, last_id)
|
||||
vocab += adj
|
||||
id = last_id
|
||||
|
||||
log("Adverbs...", tabs=1)
|
||||
adj, last_id = csv_to_vocab("Adverbien.csv", TYPE_ADVERBS, last_id)
|
||||
vocab += adj
|
||||
|
||||
|
||||
# Connect to the database
|
||||
log("Inserting vocabulary into database")
|
||||
log("Connecting...", tabs=1)
|
||||
|
||||
Reference in New Issue
Block a user