Convert dataset to Parquet (part 00001-of-00002)

#7
by albertvillanova HF staff - opened
LICENSE.txt DELETED
@@ -1,11 +0,0 @@
1
- Copyright (c) 2018 Col·lectivaT SCCL
2
-
3
- The TV3Parla speech corpus is distributed under a Creative Commons
4
- Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
5
- For details see <https://creativecommons.org/licenses/by-nc/4.0/>
6
-
7
- The audio files and transcriptions that are the basis of the corpus are the
8
- property of the Corporació Catalana de Mitjans Audiovisuals, SA (CCMA). Any
9
- derivative work needs to refer to Parlament de Catalunya as the original owner
10
- of the content and confirm with their terms of use as explained in their
11
- website. <http://www.ccma.cat/avis-legal/condicions-utilitzacio-del-portal/>
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -19,6 +19,30 @@ task_categories:
19
  task_ids:
20
  - language-modeling
21
  pretty_name: TV3Parla
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ---
23
 
24
  # Dataset Card for TV3Parla
 
19
  task_ids:
20
  - language-modeling
21
  pretty_name: TV3Parla
22
+ dataset_info:
23
+ features:
24
+ - name: path
25
+ dtype: string
26
+ - name: audio
27
+ dtype: audio
28
+ - name: text
29
+ dtype: string
30
+ splits:
31
+ - name: train
32
+ num_bytes: 33609299680.048
33
+ num_examples: 159242
34
+ - name: test
35
+ num_bytes: 627492346.34
36
+ num_examples: 2220
37
+ download_size: 34204460155
38
+ dataset_size: 34236792026.388
39
+ configs:
40
+ - config_name: default
41
+ data_files:
42
+ - split: train
43
+ path: data/train-*
44
+ - split: test
45
+ path: data/test-*
46
  ---
47
 
48
  # Dataset Card for TV3Parla
tv3_0.3_train.fileids → data/test-00000-of-00002.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8f9279f1498645ed9a8e541bcf350306f0001f945550722262372ee986e0504d
3
- size 10669708
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea22bc68ca2514e33d8902f7037c915eaec3817ccbbd88fa1c5ab3899644d4fd
3
+ size 309644027
tv3_0.3_train.transcription → data/test-00001-of-00002.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:de8385c9be9192f35903ae42c996fbf2edc4a0fe971d9a96d9aa96fe7083d44d
3
- size 23895819
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79cc9d6046f198378c91f0e775f0ef4aed0ba1009f3d686d748b7be04a810f23
3
+ size 316758463
tv3_0.3_test.fileids → data/train-00050-of-00068.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b0eca180ecebd6e9226a507114039071cddf1ddbc95389a3bb775ead24248ca2
3
- size 142304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47a62914d09b57538ab5fadf74730eefa5486fecd89c02912e8b7982b25a7b32
3
+ size 465865861
tv3_0.3_test.transcription → data/train-00051-of-00068.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4aac148ad843071e6170185a0f944779844c493dda519a3ac52135582aae576f
3
- size 401581
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52b1da0499cd9368e32c9eab9c3f4877415e17d480e62d6597a03563dd00b31a
3
+ size 487350331
data/train-00052-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a07df709d99fd46b62350bed6dac86910c26e1941c2d3643c17fe47ec0f949b8
3
+ size 469916299
data/train-00053-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a805d00c23a6b61cb60eb833293716c3cef551830721133156e839c73ff436dc
3
+ size 529869624
data/train-00054-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4134a6e091e5f24c15735b931fe5b1e9498f11dded8bda12ad5e526560f3a704
3
+ size 505609118
data/train-00055-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81dcef913df0dc26b960df4e975a683346996938d794fdbe8f330728700067f0
3
+ size 474281000
data/train-00056-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2cc1aabaf1ca774238093057dbca0dde4ff60d0ea49e3c23b92618a2325ce24
3
+ size 499822014
data/train-00057-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7f4e067c99638078c72c31975e89aef1b9d0c09e10e643e091cc6a891b545ee
3
+ size 490327853
data/train-00058-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57650392e7b2964e53bc0c63f7f0c2c071a446cdcbe027d2cc9f860e27ca7fcd
3
+ size 471084496
data/train-00059-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bc845b7dff0476fb1eaa1956b58c48aaa62a91a18a257bd7f2dffc836d6ed60
3
+ size 507802197
data/train-00060-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88493daa80064ac182680698114e79665f229f5bde53fc11a7a6844496fdeb6f
3
+ size 523353945
data/train-00061-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f73e203f7e49bbb806c5a03670a5a6066d7801bd68d24118b563b1ca8a9a46ab
3
+ size 502754596
data/train-00062-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:881cba42d5000d05705e1de067fbb0aa2d1801d5fd8c3a87786534a78f9671eb
3
+ size 500159465
data/train-00063-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f2587373f94467726d2dbd220f74914cf0310964047bec289ca775dd1d1a820
3
+ size 549987985
data/train-00064-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80caa57bde9a5b05e70ac023090d53e2e91a8c3c30800c056cbaddd8575fb3ab
3
+ size 536379259
data/train-00065-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28d83e5835251e074d4aed9ad3d04aa6ac0de9625e72ea4f4af6ad8576d9f7c9
3
+ size 477341893
data/train-00066-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93557909e825f5e89918d4b57005bd5a525e4332502bc37883b635088af2d428
3
+ size 528730998
data/train-00067-of-00068.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5857d0cf2290fd4d8919e2a46682fa07027460113f06a8c22576bbc3b8cf73a8
3
+ size 559668574
tv3_0.3.tar.gz DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ccdd9a0eadadf53731fd2f33b3a24c1d300f3899fbd9419e707065214432298d
3
- size 29637597121
 
 
 
 
tv3_parla.py DELETED
@@ -1,111 +0,0 @@
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
- """TV3Parla."""
16
-
17
- import re
18
-
19
- import datasets
20
- from datasets.tasks import AutomaticSpeechRecognition
21
-
22
-
23
- _CITATION = """\
24
- @inproceedings{kulebi18_iberspeech,
25
- author={Baybars Külebi and Alp Öktem},
26
- title={{Building an Open Source Automatic Speech Recognition System for Catalan}},
27
- year=2018,
28
- booktitle={Proc. IberSPEECH 2018},
29
- pages={25--29},
30
- doi={10.21437/IberSPEECH.2018-6}
31
- }
32
- """
33
-
34
- _DESCRIPTION = """\
35
- This corpus includes 240 hours of Catalan speech from broadcast material.
36
- The details of segmentation, data processing and also model training are explained in Külebi, Öktem; 2018.
37
- The content is owned by Corporació Catalana de Mitjans Audiovisuals, SA (CCMA);
38
- we processed their material and hereby making it available under their terms of use.
39
-
40
- This project was supported by the Softcatalà Association.
41
- """
42
-
43
- _HOMEPAGE = "https://collectivat.cat/asr#tv3parla"
44
-
45
- _LICENSE = "Creative Commons Attribution-NonCommercial 4.0 International"
46
-
47
- _REPO = "https://huggingface.co/datasets/collectivat/tv3_parla/resolve/main/"
48
- _URLS = {
49
- "transcripts": _REPO + "tv3_0.3_{split}.transcription",
50
- "audio": _REPO + "tv3_0.3.tar.gz",
51
- }
52
- _SPLITS = [datasets.Split.TRAIN, datasets.Split.TEST]
53
-
54
- _PATTERN = re.compile(r"^<s> (?P<text>.+) </s> \((?P<id>\S+)\)$")
55
-
56
-
57
- class Tv3Parla(datasets.GeneratorBasedBuilder):
58
- """TV3Parla."""
59
-
60
- VERSION = datasets.Version("0.3.0")
61
-
62
- def _info(self):
63
- return datasets.DatasetInfo(
64
- description=_DESCRIPTION,
65
- features=datasets.Features(
66
- {
67
- "path": datasets.Value("string"),
68
- "audio": datasets.features.Audio(),
69
- "text": datasets.Value("string"),
70
- }
71
- ),
72
- supervised_keys=None,
73
- homepage=_HOMEPAGE,
74
- license=_LICENSE,
75
- citation=_CITATION,
76
- task_templates=[
77
- AutomaticSpeechRecognition(transcription_column="text")
78
- ],
79
- )
80
-
81
- def _split_generators(self, dl_manager):
82
- urls = {
83
- split: {key: url.format(split=split) for key, url in _URLS.items()} for split in _SPLITS
84
- }
85
- dl_dir = dl_manager.download(urls)
86
- return [
87
- datasets.SplitGenerator(
88
- name=split,
89
- gen_kwargs={
90
- "transcripts_path": dl_dir[split]["transcripts"],
91
- "audio_files": dl_manager.iter_archive(dl_dir[split]["audio"]),
92
- "split": split,
93
- },
94
- ) for split in _SPLITS
95
- ]
96
-
97
- def _generate_examples(self, transcripts_path, audio_files, split):
98
- transcripts = {}
99
- with open(transcripts_path, encoding="utf-8") as transcripts_file:
100
- for line in transcripts_file:
101
- match = _PATTERN.match(line)
102
- transcripts[match["id"]] = match["text"]
103
- # train: 159242; test: 2220
104
- for key, (path, file) in enumerate(audio_files):
105
- if path.endswith(".wav") and f"/{split}/" in path:
106
- uid = path.split("/")[-1][:-4]
107
- if uid not in transcripts:
108
- continue
109
- text = transcripts.pop(uid)
110
- audio = {"path": path, "bytes": file.read()}
111
- yield key, {"path": path, "audio": audio, "text": text}