feat: complete academic symbol lexicon heal, 2-column Cooper extraction, and updated assets
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import json
|
||||
|
||||
with open("oracle_enricher/data/lexicon.json") as f:
|
||||
words = json.load(f)
|
||||
|
||||
sorted_words = sorted(words, key=lambda w: w["word"].lower().replace("ё", "е9"))
|
||||
|
||||
with open("words_alphabetical.txt", "w", encoding="utf-8") as f:
|
||||
for i, w in enumerate(sorted_words, 1):
|
||||
f.write(f"{i}. {w["word"]} {w["emoji"]} (id: {w["id"]})\n")
|
||||
|
||||
with open("words_alphabetical.md", "w", encoding="utf-8") as f:
|
||||
f.write("# Алфавитный список 1000 слов Оракула\n\n")
|
||||
f.write("| № | Слово | Эмодзи | ID | Часть речи | Категория |\n")
|
||||
f.write("|---|---|---|---|---|---|\n")
|
||||
for i, w in enumerate(sorted_words, 1):
|
||||
wid = w["id"]
|
||||
f.write(f"| {i} | **{w["word"]}** | {w["emoji"]} | #{wid:03d} | {w["pos"]} | {w["category"]} |\n")
|
||||
|
||||
print("Alphabetical files updated successfully!")
|
||||
Reference in New Issue
Block a user