improved database

This commit is contained in:
Jonas Weinz 2023-03-26 17:17:56 +02:00
parent d18c115a9c
commit 54a8f26eca
4 changed files with 23505 additions and 12 deletions

23493
data/nltk_corpus.ipynb Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,14 +13,14 @@ def get_difficulty_threshold(lang: str, difficulty: int):
get_difficulty_threshold.thresholds = {
'de': {
0: 10,
1: 6,
2: 0
0: 3,
1: 2,
2: 1
},
'en': {
0: 150,
1: 100,
2: 10
0: 5,
1: 2,
2: 1
}
}
@ -50,8 +50,8 @@ def get_database(lang: str = "en", difficulty: int = -1) -> dict:
db = get_database._dbs[lang][-1]
new_db = {}
for word_key, item in db.items():
num_translations = item['num_translations']
if num_translations >= t:
frequency = item['frequency']
if frequency >= t:
new_db[word_key] = item
get_database._dbs[lang][difficulty] = new_db

BIN
server/de.json (Stored with Git LFS)

Binary file not shown.

BIN
server/en.json (Stored with Git LFS)

Binary file not shown.