cheulyop commited on
Commit
d2ec583
1 Parent(s): 4598edf

Initial commit for KsponSpeech. (v0.1.0)

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. README.md +127 -0
  3. ksponspeech.py +116 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .lock
README.md ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ YAML tags:
3
+ - copy-paste the tags obtained with the tagging app: https://github.com/huggingface/datasets-tagging
4
+ ---
5
+
6
+ # Dataset Card for [KsponSpeech]
7
+
8
+ ## Table of Contents
9
+ - [Table of Contents](#table-of-contents)
10
+ - [Dataset Description](#dataset-description)
11
+ - [Dataset Summary](#dataset-summary)
12
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
13
+ - [Languages](#languages)
14
+ - [Dataset Structure](#dataset-structure)
15
+ - [Data Instances](#data-instances)
16
+ - [Data Fields](#data-fields)
17
+ - [Data Splits](#data-splits)
18
+ - [Dataset Creation](#dataset-creation)
19
+ - [Curation Rationale](#curation-rationale)
20
+ - [Source Data](#source-data)
21
+ - [Annotations](#annotations)
22
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
23
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
24
+ - [Social Impact of Dataset](#social-impact-of-dataset)
25
+ - [Discussion of Biases](#discussion-of-biases)
26
+ - [Other Known Limitations](#other-known-limitations)
27
+ - [Additional Information](#additional-information)
28
+ - [Dataset Curators](#dataset-curators)
29
+ - [Licensing Information](#licensing-information)
30
+ - [Citation Information](#citation-information)
31
+ - [Contributions](#contributions)
32
+
33
+ ## Dataset Description
34
+
35
+ - **Homepage:**
36
+ - **Repository:**
37
+ - **Paper:**
38
+ - **Leaderboard:**
39
+ - **Point of Contact:**
40
+
41
+ ### Dataset Summary
42
+
43
+ KsponSpeech is a large-scale spontaneous speech corpus of Korean conversations. This corpus contains 969 hrs of general open-domain dialog utterances, spoken by about 2,000 native Korean speakers in a clean environment. All data were constructed by recording the dialogue of two people freely conversing on a variety of topics and manually transcribing the utterances. The transcription provides a dual transcription consisting of orthography and pronunciation, and disfluency tags for spontaneity of speech, such as filler words, repeated words, and word fragments. KsponSpeech is publicly available on an open data hub site of the Korea government. (https://aihub.or.kr/aidata/105)
44
+
45
+ ### Supported Tasks and Leaderboards
46
+
47
+ [More Information Needed]
48
+
49
+ ### Languages
50
+
51
+ [More Information Needed]
52
+
53
+ ## Dataset Structure
54
+
55
+ ### Data Instances
56
+
57
+ [More Information Needed]
58
+
59
+ ### Data Fields
60
+
61
+ [More Information Needed]
62
+
63
+ ### Data Splits
64
+
65
+ [More Information Needed]
66
+
67
+ ## Dataset Creation
68
+
69
+ ### Curation Rationale
70
+
71
+ [More Information Needed]
72
+
73
+ ### Source Data
74
+
75
+ #### Initial Data Collection and Normalization
76
+
77
+ [More Information Needed]
78
+
79
+ #### Who are the source language producers?
80
+
81
+ [More Information Needed]
82
+
83
+ ### Annotations
84
+
85
+ #### Annotation process
86
+
87
+ [More Information Needed]
88
+
89
+ #### Who are the annotators?
90
+
91
+ [More Information Needed]
92
+
93
+ ### Personal and Sensitive Information
94
+
95
+ [More Information Needed]
96
+
97
+ ## Considerations for Using the Data
98
+
99
+ ### Social Impact of Dataset
100
+
101
+ [More Information Needed]
102
+
103
+ ### Discussion of Biases
104
+
105
+ [More Information Needed]
106
+
107
+ ### Other Known Limitations
108
+
109
+ [More Information Needed]
110
+
111
+ ## Additional Information
112
+
113
+ ### Dataset Curators
114
+
115
+ [More Information Needed]
116
+
117
+ ### Licensing Information
118
+
119
+ [More Information Needed]
120
+
121
+ ### Citation Information
122
+
123
+ [More Information Needed]
124
+
125
+ ### Contributions
126
+
127
+ Thanks to [@github-username](https://github.com/<github-username>) for adding this dataset.
ksponspeech.py ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """The Korean Spontaneous Speech Corpus for Automatic Speech Recognition (KsponSpeech)"""
16
+
17
+
18
+ import os
19
+ import datasets
20
+
21
+
22
+ _CITATION = """\
23
+ @article{bang2020ksponspeech,
24
+ title={KsponSpeech: Korean spontaneous speech corpus for automatic speech recognition},
25
+ author={Bang, Jeong-Uk and Yun, Seung and Kim, Seung-Hi and Choi, Mu-Yeol and Lee, Min-Kyu and Kim, Yeo-Jeong and Kim, Dong-Hyun and Park, Jun and Lee, Young-Jik and Kim, Sang-Hun},
26
+ journal={Applied Sciences},
27
+ volume={10},
28
+ number={19},
29
+ pages={6936},
30
+ year={2020},
31
+ publisher={Multidisciplinary Digital Publishing Institute}
32
+ }
33
+ """
34
+
35
+ _DESCRIPTION = """\
36
+ KsponSpeech is a large-scale spontaneous speech corpus of Korean conversations. This corpus contains 969 hrs of general open-domain dialog utterances, spoken by about 2,000 native Korean speakers in a clean environment. All data were constructed by recording the dialogue of two people freely conversing on a variety of topics and manually transcribing the utterances. The transcription provides a dual transcription consisting of orthography and pronunciation, and disfluency tags for spontaneity of speech, such as filler words, repeated words, and word fragments. KsponSpeech is publicly available on an open data hub site of the Korea government. (https://aihub.or.kr/aidata/105)
37
+ """
38
+
39
+ _HOMEPAGE = "https://aihub.or.kr/aidata/105"
40
+
41
+
42
+ class KsponSpeech(datasets.GeneratorBasedBuilder):
43
+ """The Korean Spontaneous Speech Corpus for Automatic Speech Recognition (KsponSpeech)"""
44
+
45
+ VERSION = datasets.Version("0.1.0")
46
+
47
+ @property
48
+ def manual_download_instructions(self):
49
+ return (
50
+ "To use KsponSpeech, data files must be downloaded manually to a local drive. Please submit your request on the official website (https://aihub.or.kr/aidata/105). Once your request is approved, download all files, extract .zip files in one folder, and load the dataset with `datasets.load_dataset('ksponspeech', data_dir='path/to/folder')`."
51
+ )
52
+
53
+ def _info(self):
54
+ return datasets.DatasetInfo(
55
+ description=_DESCRIPTION,
56
+ features=datasets.Features(
57
+ {
58
+ "path": datasets.Value("string"),
59
+ "sentence": datasets.Value("string"),
60
+ }
61
+ ),
62
+ supervised_keys=None,
63
+ homepage=_HOMEPAGE,
64
+ citation=_CITATION,
65
+ )
66
+
67
+ def _split_generators(self, dl_manager):
68
+ """Returns SplitGenerators."""
69
+ data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
70
+ return [
71
+ datasets.SplitGenerator(
72
+ name=datasets.Split.TRAIN,
73
+ gen_kwargs={
74
+ "filepath": os.path.join(data_dir, "scripts/train.trn"),
75
+ "split": "train",
76
+ },
77
+ ),
78
+ datasets.SplitGenerator(
79
+ name=datasets.Split.TEST,
80
+ gen_kwargs={
81
+ "filepath": {"clean": os.path.join(data_dir, "scripts/eval_clean.trn"), "other": os.path.join(data_dir, "scripts/eval_other.trn")},
82
+ "split": "test"
83
+ },
84
+ ),
85
+ datasets.SplitGenerator(
86
+ name=datasets.Split.VALIDATION,
87
+ gen_kwargs={
88
+ "filepath": os.path.join(data_dir, "scripts/dev.trn"),
89
+ "split": "dev",
90
+ },
91
+ ),
92
+ ]
93
+
94
+ def _generate_examples(self, filepath, split):
95
+ """ Yields examples as (key, example) tuples. """
96
+ print(filepath, split)
97
+ if split is "test":
98
+ with open(filepath["clean"], encoding="utf-8") as f1, open(filepath["other"], encoding="utf-8") as f2:
99
+ data = "\n".join([f1.read().strip(), f2.read().strip()])
100
+ for id_, row in enumerate(data.split("\n")):
101
+ path, sentence = tuple(row.split(" :: "))
102
+ yield id_, {
103
+ "path": path,
104
+ "sentence": sentence,
105
+ }
106
+ else:
107
+ with open(filepath, encoding="utf-8") as f:
108
+ data = f.read().strip()
109
+ print(data)
110
+ for id_, row in enumerate(data.split("\n")):
111
+ print(row)
112
+ path, sentence = tuple(row.split(" :: "))
113
+ yield id_, {
114
+ "path": path,
115
+ "sentence": sentence
116
+ }