QubitPi commited on
Commit
fa3521c
1 Parent(s): 126f86f

Support Akkadian

Browse files
Files changed (2) hide show
  1. README.md +10 -4
  2. wiktionary/wiktextract/extract.py +6 -2
README.md CHANGED
@@ -16,6 +16,10 @@ configs:
16
  path: latin-wiktextract-data.jsonl
17
  - split: AncientGreek
18
  path: ancient-greek-wiktextract-data.jsonl
 
 
 
 
19
  - split: GraphData
20
  path: word-definition-graph-data.jsonl
21
  tags:
@@ -41,10 +45,11 @@ Wiktionary Data on Hugging Face Datasets
41
  [wiktionary-data]() is a sub-data extraction of the [English Wiktionary](https://en.wiktionary.org) that currently
42
  supports the following languages:
43
 
44
- - German
45
- - Latin
46
- - Ancient Greek
47
- - [Old Persian](https://en.wikipedia.org/wiki/Old_Persian_cuneiform)
 
48
 
49
  [wiktionary-data]() was originally a sub-module of [wilhelm-graphdb](https://github.com/QubitPi/wilhelm-graphdb). While
50
  the dataset it's getting bigger, I noticed a wave of more exciting potentials this dataset can bring about that
@@ -64,6 +69,7 @@ The available splits are
64
  - `Latin`
65
  - `AncientGreek`
66
  - `OldPersian`
 
67
 
68
  In addition, a separate split for graph data is offered:
69
 
 
16
  path: latin-wiktextract-data.jsonl
17
  - split: AncientGreek
18
  path: ancient-greek-wiktextract-data.jsonl
19
+ - split: OldPersian
20
+ path: old-persian-wiktextract-data.jsonl
21
+ - split: Akkadian
22
+ path: akkadian-wiktextract-data.jsonl
23
  - split: GraphData
24
  path: word-definition-graph-data.jsonl
25
  tags:
 
45
  [wiktionary-data]() is a sub-data extraction of the [English Wiktionary](https://en.wiktionary.org) that currently
46
  supports the following languages:
47
 
48
+ - __Deutsch__ - German
49
+ - __Latinum__ - Latin
50
+ - __Ἑλληνική__ - Ancient Greek
51
+ - __𐎠𐎼𐎹__ - [Old Persian](https://en.wikipedia.org/wiki/Old_Persian_cuneiform)
52
+ - __𒀝𒅗𒁺𒌑(𒌝)__ - [Akkadian](https://en.wikipedia.org/wiki/Akkadian_language)
53
 
54
  [wiktionary-data]() was originally a sub-module of [wilhelm-graphdb](https://github.com/QubitPi/wilhelm-graphdb). While
55
  the dataset it's getting bigger, I noticed a wave of more exciting potentials this dataset can bring about that
 
69
  - `Latin`
70
  - `AncientGreek`
71
  - `OldPersian`
72
+ - `Akkadian`
73
 
74
  In addition, a separate split for graph data is offered:
75
 
wiktionary/wiktextract/extract.py CHANGED
@@ -42,7 +42,8 @@ def extract_data(wiktextract_data_path: str):
42
  open("german-wiktextract-data.jsonl", "w") as german,
43
  open("latin-wiktextract-data.jsonl", "w") as latin,
44
  open("ancient-greek-wiktextract-data.jsonl", "w") as ancient_greek,
45
- open("old-persian-wiktextract-data.jsonl", "w") as old_persian
 
46
  ):
47
  for line in data:
48
  vocabulary = json.loads(line)
@@ -72,7 +73,10 @@ def extract_data(wiktextract_data_path: str):
72
  ancient_greek.write("\n")
73
  if vocabulary["lang"] == "Old Persian":
74
  old_persian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
75
- ancient_greek.write("\n")
 
 
 
76
 
77
  def extract_graph(wiktextract_data_path: str):
78
  import json
 
42
  open("german-wiktextract-data.jsonl", "w") as german,
43
  open("latin-wiktextract-data.jsonl", "w") as latin,
44
  open("ancient-greek-wiktextract-data.jsonl", "w") as ancient_greek,
45
+ open("old-persian-wiktextract-data.jsonl", "w") as old_persian,
46
+ open("akkadian-wiktextract-data.jsonl", "w") as akkadian
47
  ):
48
  for line in data:
49
  vocabulary = json.loads(line)
 
73
  ancient_greek.write("\n")
74
  if vocabulary["lang"] == "Old Persian":
75
  old_persian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
76
+ old_persian.write("\n")
77
+ if vocabulary["lang"] == "Akkadian":
78
+ akkadian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
79
+ akkadian.write("\n")
80
 
81
  def extract_graph(wiktextract_data_path: str):
82
  import json