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

Support Old Persian

Browse files
Files changed (2) hide show
  1. README.md +5 -3
  2. wiktionary/wiktextract/extract.py +5 -1
README.md CHANGED
@@ -6,6 +6,7 @@ language:
6
  - de
7
  - grc
8
  - la
 
9
  configs:
10
  - config_name: Languages
11
  data_files:
@@ -30,10 +31,11 @@ size_categories:
30
  Wiktionary Data on Hugging Face Datasets
31
  ========================================
32
 
 
 
33
  ![Python Version Badge]
34
  [![GitHub workflow status badge][GitHub workflow status badge]][GitHub workflow status URL]
35
  [![Hugging Face sync status badge]][Hugging Face sync status URL]
36
- [![Hugging Face dataset badge]][Hugging Face dataset URL]
37
  [![Apache License Badge]][Apache License, Version 2.0]
38
 
39
  [wiktionary-data]() is a sub-data extraction of the [English Wiktionary](https://en.wiktionary.org) that currently
@@ -42,7 +44,7 @@ supports the following languages:
42
  - German
43
  - Latin
44
  - Ancient Greek
45
- - Old Persian
46
 
47
  [wiktionary-data]() was originally a sub-module of [wilhelm-graphdb](https://github.com/QubitPi/wilhelm-graphdb). While
48
  the dataset it's getting bigger, I noticed a wave of more exciting potentials this dataset can bring about that
@@ -91,7 +93,7 @@ The use and distribution terms for [wiktionary-data]() are covered by the [Apach
91
  [GitHub workflow status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/wiktionary-data/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=CI/CD
92
  [GitHub workflow status URL]: https://github.com/QubitPi/wiktionary-data/actions/workflows/ci-cd.yaml
93
 
94
- [Hugging Face dataset badge]: https://img.shields.io/badge/Hugging%20Face%20Dataset-wilhelm--graphdb-FFD21E?style=for-the-badge&logo=huggingface&logoColor=white
95
  [Hugging Face dataset URL]: https://huggingface.co/datasets/QubitPi/wiktionary-data
96
 
97
  [Hugging Face sync status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/wiktionary-data/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=Hugging%20Face%20Sync%20Up
 
6
  - de
7
  - grc
8
  - la
9
+ - peo
10
  configs:
11
  - config_name: Languages
12
  data_files:
 
31
  Wiktionary Data on Hugging Face Datasets
32
  ========================================
33
 
34
+ [![Hugging Face dataset badge]][Hugging Face dataset URL]
35
+
36
  ![Python Version Badge]
37
  [![GitHub workflow status badge][GitHub workflow status badge]][GitHub workflow status URL]
38
  [![Hugging Face sync status badge]][Hugging Face sync status URL]
 
39
  [![Apache License Badge]][Apache License, Version 2.0]
40
 
41
  [wiktionary-data]() is a sub-data extraction of the [English Wiktionary](https://en.wiktionary.org) that currently
 
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
 
93
  [GitHub workflow status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/wiktionary-data/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=CI/CD
94
  [GitHub workflow status URL]: https://github.com/QubitPi/wiktionary-data/actions/workflows/ci-cd.yaml
95
 
96
+ [Hugging Face dataset badge]: https://img.shields.io/badge/Hugging%20Face%20Dataset-wiktionary--data-FFD21E?style=for-the-badge&logo=huggingface&logoColor=white
97
  [Hugging Face dataset URL]: https://huggingface.co/datasets/QubitPi/wiktionary-data
98
 
99
  [Hugging Face sync status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/wiktionary-data/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=Hugging%20Face%20Sync%20Up
wiktionary/wiktextract/extract.py CHANGED
@@ -41,7 +41,8 @@ def extract_data(wiktextract_data_path: str):
41
  with (open(wiktextract_data_path) as data,
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
  ):
46
  for line in data:
47
  vocabulary = json.loads(line)
@@ -69,6 +70,9 @@ def extract_data(wiktextract_data_path: str):
69
  if vocabulary["lang"] == "Ancient Greek":
70
  ancient_greek.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
71
  ancient_greek.write("\n")
 
 
 
72
 
73
  def extract_graph(wiktextract_data_path: str):
74
  import json
 
41
  with (open(wiktextract_data_path) as data,
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)
 
70
  if vocabulary["lang"] == "Ancient Greek":
71
  ancient_greek.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
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