Support Elamite
Browse files- README.md +6 -0
- wiktionary/wiktextract/extract.py +4 -0
README.md
CHANGED
@@ -9,6 +9,7 @@ language:
|
|
9 |
- ko
|
10 |
- peo
|
11 |
- akk
|
|
|
12 |
- sa
|
13 |
configs:
|
14 |
- config_name: Wiktionary
|
@@ -25,6 +26,8 @@ configs:
|
|
25 |
path: old-persian-wiktextract-data.jsonl
|
26 |
- split: Akkadian
|
27 |
path: akkadian-wiktextract-data.jsonl
|
|
|
|
|
28 |
- split: Sanskrit
|
29 |
path: sanskrit-wiktextract-data.jsonl
|
30 |
- config_name: Knowledge Graph
|
@@ -42,6 +45,7 @@ tags:
|
|
42 |
- Korean
|
43 |
- Old Persian
|
44 |
- Akkadian
|
|
|
45 |
- Sanskrit
|
46 |
- Knowledge Graph
|
47 |
size_categories:
|
@@ -67,6 +71,7 @@ supports the following languages:
|
|
67 |
- __한국어__ - Korean
|
68 |
- __𐎠𐎼𐎹__ - [Old Persian](https://en.wikipedia.org/wiki/Old_Persian_cuneiform)
|
69 |
- __𒀝𒅗𒁺𒌑(𒌝)__ - [Akkadian](https://en.wikipedia.org/wiki/Akkadian_language)
|
|
|
70 |
- __संस्कृतम्__ - Sanskrit, or Classical Sanskrit
|
71 |
|
72 |
[wiktionary-data]() was originally a sub-module of [wilhelm-graphdb](https://github.com/QubitPi/wilhelm-graphdb). While
|
@@ -91,6 +96,7 @@ There are __two__ data subsets:
|
|
91 |
- `Korean`
|
92 |
- `OldPersian`
|
93 |
- `Akkadian`
|
|
|
94 |
- `Sanskrit`
|
95 |
|
96 |
2. __Graph__ subset that is useful for constructing knowledge graphs:
|
|
|
9 |
- ko
|
10 |
- peo
|
11 |
- akk
|
12 |
+
- elx
|
13 |
- sa
|
14 |
configs:
|
15 |
- config_name: Wiktionary
|
|
|
26 |
path: old-persian-wiktextract-data.jsonl
|
27 |
- split: Akkadian
|
28 |
path: akkadian-wiktextract-data.jsonl
|
29 |
+
- split: Elamite
|
30 |
+
path: elamite-wiktextract-data.jsonl
|
31 |
- split: Sanskrit
|
32 |
path: sanskrit-wiktextract-data.jsonl
|
33 |
- config_name: Knowledge Graph
|
|
|
45 |
- Korean
|
46 |
- Old Persian
|
47 |
- Akkadian
|
48 |
+
- Elamite
|
49 |
- Sanskrit
|
50 |
- Knowledge Graph
|
51 |
size_categories:
|
|
|
71 |
- __한국어__ - Korean
|
72 |
- __𐎠𐎼𐎹__ - [Old Persian](https://en.wikipedia.org/wiki/Old_Persian_cuneiform)
|
73 |
- __𒀝𒅗𒁺𒌑(𒌝)__ - [Akkadian](https://en.wikipedia.org/wiki/Akkadian_language)
|
74 |
+
- [Elamite](https://en.wikipedia.org/wiki/Elamite_language)
|
75 |
- __संस्कृतम्__ - Sanskrit, or Classical Sanskrit
|
76 |
|
77 |
[wiktionary-data]() was originally a sub-module of [wilhelm-graphdb](https://github.com/QubitPi/wilhelm-graphdb). While
|
|
|
96 |
- `Korean`
|
97 |
- `OldPersian`
|
98 |
- `Akkadian`
|
99 |
+
- `Elamite`
|
100 |
- `Sanskrit`
|
101 |
|
102 |
2. __Graph__ subset that is useful for constructing knowledge graphs:
|
wiktionary/wiktextract/extract.py
CHANGED
@@ -45,6 +45,7 @@ def extract_data(wiktextract_data_path: str):
|
|
45 |
open("korean-wiktextract-data.jsonl", "w") as korean,
|
46 |
open("old-persian-wiktextract-data.jsonl", "w") as old_persian,
|
47 |
open("akkadian-wiktextract-data.jsonl", "w") as akkadian,
|
|
|
48 |
open("sanskrit-wiktextract-data.jsonl", "w") as sanskrit
|
49 |
):
|
50 |
for line in data:
|
@@ -82,6 +83,9 @@ def extract_data(wiktextract_data_path: str):
|
|
82 |
if vocabulary["lang"] == "Akkadian":
|
83 |
akkadian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
|
84 |
akkadian.write("\n")
|
|
|
|
|
|
|
85 |
if vocabulary["lang"] == "Sanskrit":
|
86 |
sanskrit.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
|
87 |
sanskrit.write("\n")
|
|
|
45 |
open("korean-wiktextract-data.jsonl", "w") as korean,
|
46 |
open("old-persian-wiktextract-data.jsonl", "w") as old_persian,
|
47 |
open("akkadian-wiktextract-data.jsonl", "w") as akkadian,
|
48 |
+
open("elamite-wiktextract-data.jsonl", "w") as elamite,
|
49 |
open("sanskrit-wiktextract-data.jsonl", "w") as sanskrit
|
50 |
):
|
51 |
for line in data:
|
|
|
83 |
if vocabulary["lang"] == "Akkadian":
|
84 |
akkadian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
|
85 |
akkadian.write("\n")
|
86 |
+
if vocabulary["lang"] == "Elamite":
|
87 |
+
elamite.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
|
88 |
+
elamite.write("\n")
|
89 |
if vocabulary["lang"] == "Sanskrit":
|
90 |
sanskrit.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
|
91 |
sanskrit.write("\n")
|