Datasets:
Modalities:
Text
Formats:
parquet
Sub-tasks:
slot-filling
Languages:
English
Size:
10K - 100K
License:
Update files from the datasets library (from 1.7.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.7.0
- README.md +4 -3
- youtube_caption_corrections.py +4 -4
README.md
CHANGED
@@ -20,6 +20,7 @@ task_categories:
|
|
20 |
task_ids:
|
21 |
- other-other-token-classification-of-text-errors
|
22 |
- slot-filling
|
|
|
23 |
---
|
24 |
|
25 |
# Dataset Card for YouTube Caption Corrections
|
@@ -27,12 +28,12 @@ task_ids:
|
|
27 |
## Table of Contents
|
28 |
- [Dataset Description](#dataset-description)
|
29 |
- [Dataset Summary](#dataset-summary)
|
30 |
-
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
31 |
- [Languages](#languages)
|
32 |
- [Dataset Structure](#dataset-structure)
|
33 |
- [Data Instances](#data-instances)
|
34 |
-
- [Data Fields](#data-
|
35 |
-
- [Data Splits](#data-
|
36 |
- [Dataset Creation](#dataset-creation)
|
37 |
- [Curation Rationale](#curation-rationale)
|
38 |
- [Source Data](#source-data)
|
|
|
20 |
task_ids:
|
21 |
- other-other-token-classification-of-text-errors
|
22 |
- slot-filling
|
23 |
+
paperswithcode_id: null
|
24 |
---
|
25 |
|
26 |
# Dataset Card for YouTube Caption Corrections
|
|
|
28 |
## Table of Contents
|
29 |
- [Dataset Description](#dataset-description)
|
30 |
- [Dataset Summary](#dataset-summary)
|
31 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
32 |
- [Languages](#languages)
|
33 |
- [Dataset Structure](#dataset-structure)
|
34 |
- [Data Instances](#data-instances)
|
35 |
+
- [Data Fields](#data-fields)
|
36 |
+
- [Data Splits](#data-splits)
|
37 |
- [Dataset Creation](#dataset-creation)
|
38 |
- [Curation Rationale](#curation-rationale)
|
39 |
- [Source Data](#source-data)
|
youtube_caption_corrections.py
CHANGED
@@ -88,17 +88,17 @@ class YoutubeCaptionCorrections(datasets.GeneratorBasedBuilder):
|
|
88 |
|
89 |
def _generate_examples(self, filepaths):
|
90 |
"""Yields examples."""
|
91 |
-
for fp in filepaths:
|
92 |
with open(fp, "r", encoding="utf-8") as json_file:
|
93 |
json_lists = list(json_file)
|
94 |
-
for json_list_str in json_lists:
|
95 |
json_list = json.loads(json_list_str)
|
96 |
|
97 |
-
for
|
98 |
response = {
|
99 |
"video_ids": result["video_ids"],
|
100 |
"diff_type": result["diff_type"],
|
101 |
"default_seq": result["default_seq"],
|
102 |
"correction_seq": result["correction_seq"],
|
103 |
}
|
104 |
-
yield
|
|
|
88 |
|
89 |
def _generate_examples(self, filepaths):
|
90 |
"""Yields examples."""
|
91 |
+
for file_idx, fp in enumerate(filepaths):
|
92 |
with open(fp, "r", encoding="utf-8") as json_file:
|
93 |
json_lists = list(json_file)
|
94 |
+
for line_idx, json_list_str in enumerate(json_lists):
|
95 |
json_list = json.loads(json_list_str)
|
96 |
|
97 |
+
for ctr_idx, result in enumerate(json_list):
|
98 |
response = {
|
99 |
"video_ids": result["video_ids"],
|
100 |
"diff_type": result["diff_type"],
|
101 |
"default_seq": result["default_seq"],
|
102 |
"correction_seq": result["correction_seq"],
|
103 |
}
|
104 |
+
yield f"{file_idx}_{line_idx}_{ctr_idx}", response
|