QubitPi commited on
Commit
e240108
1 Parent(s): fa3521c

Support Korean

Browse files
.github/workflows/ci-cd.yaml CHANGED
@@ -79,12 +79,8 @@ jobs:
79
 
80
  git lfs install
81
  git lfs track "*-wiktextract-data.jsonl"
82
- git lfs track "word-definition-graph-data.jsonl"
83
-
84
  git add *-wiktextract-data.jsonl
85
- git add word-definition-graph-data.jsonl
86
-
87
- git commit -m "Extract raw-wiktextract-data.jsonl into per-language wiktextract-data.jsonl and generate graph data"
88
  git push https://QubitPi:$HF_TOKEN@huggingface.co/datasets/QubitPi/wiktionary-data master:main -f
89
  env:
90
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
 
79
 
80
  git lfs install
81
  git lfs track "*-wiktextract-data.jsonl"
 
 
82
  git add *-wiktextract-data.jsonl
83
+ git commit -m "Extract raw-wiktextract-data.jsonl into per-language wiktextract-data.jsonl"
 
 
84
  git push https://QubitPi:$HF_TOKEN@huggingface.co/datasets/QubitPi/wiktionary-data master:main -f
85
  env:
86
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
README.md CHANGED
@@ -4,9 +4,11 @@ pretty_name: English Wiktionary Data in JSONL
4
  language:
5
  - en
6
  - de
7
- - grc
8
  - la
 
 
9
  - peo
 
10
  configs:
11
  - config_name: Languages
12
  data_files:
@@ -16,17 +18,20 @@ configs:
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:
26
  - Wiktionary
27
  - German
28
- - Ancient Greek
29
  - Latin
 
 
 
 
30
  - Vocabulary
31
  size_categories:
32
  - 1M<n<10M
@@ -48,6 +53,7 @@ supports the following languages:
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
 
@@ -68,15 +74,10 @@ The available splits are
68
  - `German`
69
  - `Latin`
70
  - `AncientGreek`
 
71
  - `OldPersian`
72
  - `Akkadian`
73
 
74
- In addition, a separate split for graph data is offered:
75
-
76
- - `GraphData`
77
-
78
- This split contains all the languages and puts everything in a giant graph
79
-
80
  Development
81
  -----------
82
 
@@ -99,7 +100,7 @@ The use and distribution terms for [wiktionary-data]() are covered by the [Apach
99
  [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
100
  [GitHub workflow status URL]: https://github.com/QubitPi/wiktionary-data/actions/workflows/ci-cd.yaml
101
 
102
- [Hugging Face dataset badge]: https://img.shields.io/badge/Hugging%20Face%20Dataset-wiktionary--data-FFD21E?style=for-the-badge&logo=huggingface&logoColor=white
103
  [Hugging Face dataset URL]: https://huggingface.co/datasets/QubitPi/wiktionary-data
104
 
105
  [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
 
4
  language:
5
  - en
6
  - de
 
7
  - la
8
+ - grc
9
+ - ko
10
  - peo
11
+ - akk
12
  configs:
13
  - config_name: Languages
14
  data_files:
 
18
  path: latin-wiktextract-data.jsonl
19
  - split: AncientGreek
20
  path: ancient-greek-wiktextract-data.jsonl
21
+ - split: Korean
22
+ path: korean-wiktextract-data.jsonl
23
  - split: OldPersian
24
  path: old-persian-wiktextract-data.jsonl
25
  - split: Akkadian
26
  path: akkadian-wiktextract-data.jsonl
 
 
27
  tags:
28
  - Wiktionary
29
  - German
 
30
  - Latin
31
+ - Ancient Greek
32
+ - Korean
33
+ - Old Persian
34
+ - Akkadian
35
  - Vocabulary
36
  size_categories:
37
  - 1M<n<10M
 
53
  - __Deutsch__ - German
54
  - __Latinum__ - Latin
55
  - __Ἑλληνική__ - Ancient Greek
56
+ - __한국어__ - Korean
57
  - __𐎠𐎼𐎹__ - [Old Persian](https://en.wikipedia.org/wiki/Old_Persian_cuneiform)
58
  - __𒀝𒅗𒁺𒌑(𒌝)__ - [Akkadian](https://en.wikipedia.org/wiki/Akkadian_language)
59
 
 
74
  - `German`
75
  - `Latin`
76
  - `AncientGreek`
77
+ - `Korean`
78
  - `OldPersian`
79
  - `Akkadian`
80
 
 
 
 
 
 
 
81
  Development
82
  -----------
83
 
 
100
  [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
101
  [GitHub workflow status URL]: https://github.com/QubitPi/wiktionary-data/actions/workflows/ci-cd.yaml
102
 
103
+ [Hugging Face dataset badge]: https://img.shields.io/badge/Hugging%20Face%20Dataset-wiktionary--data-FF9D00?style=for-the-badge&logo=huggingface&logoColor=white&labelColor=6B7280
104
  [Hugging Face dataset URL]: https://huggingface.co/datasets/QubitPi/wiktionary-data
105
 
106
  [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
extract.py CHANGED
@@ -23,4 +23,3 @@ if __name__ == "__main__":
23
  args = vars(parser.parse_args())
24
 
25
  extract_data(args["input"])
26
- extract_graph(args["input"])
 
23
  args = vars(parser.parse_args())
24
 
25
  extract_data(args["input"])
 
wiktionary/wiktextract/extract.py CHANGED
@@ -42,6 +42,7 @@ 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
  open("akkadian-wiktextract-data.jsonl", "w") as akkadian
47
  ):
@@ -71,6 +72,9 @@ def extract_data(wiktextract_data_path: str):
71
  if vocabulary["lang"] == "Ancient Greek":
72
  ancient_greek.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
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")
 
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("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
  ):
 
72
  if vocabulary["lang"] == "Ancient Greek":
73
  ancient_greek.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
74
  ancient_greek.write("\n")
75
+ if vocabulary["lang"] == "korean":
76
+ korean.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
77
+ korean.write("\n")
78
  if vocabulary["lang"] == "Old Persian":
79
  old_persian.write(json.dumps({"term": term, "part of speech": pos, "definitions": definitions, "audios": audios}))
80
  old_persian.write("\n")