parquet-converter
commited on
Commit
·
8ac0dfb
1
Parent(s):
866aa22
Update parquet files
Browse files- mmarco-train-bi.py +0 -110
- spanish.json.gz → spanish/mmarco-train-bi-train-00000-of-00020.parquet +2 -2
- spanish/mmarco-train-bi-train-00001-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00002-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00003-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00004-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00005-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00006-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00007-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00008-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00009-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00010-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00011-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00012-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00013-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00014-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00015-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00016-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00017-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00018-of-00020.parquet +3 -0
- spanish/mmarco-train-bi-train-00019-of-00020.parquet +3 -0
mmarco-train-bi.py
DELETED
@@ -1,110 +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.Wikipedia
|
15 |
-
|
16 |
-
# Lint as: python3
|
17 |
-
"""mMARCO Passage dataset."""
|
18 |
-
|
19 |
-
import json
|
20 |
-
|
21 |
-
import datasets
|
22 |
-
|
23 |
-
_CITATION = """
|
24 |
-
"""
|
25 |
-
|
26 |
-
_DESCRIPTION = "dataset load script for mMARCO bilingual-training datasets"
|
27 |
-
|
28 |
-
languages = [
|
29 |
-
"spanish"
|
30 |
-
]
|
31 |
-
_DATASET_URLS = {
|
32 |
-
lang: {
|
33 |
-
'train': f"https://huggingface.co/datasets/crystina-z/mmarco-train-bi/resolve/main/{lang}.json.gz",
|
34 |
-
} for lang in languages
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
class MMarcoPassage(datasets.GeneratorBasedBuilder):
|
39 |
-
BUILDER_CONFIGS = [datasets.BuilderConfig(
|
40 |
-
version=datasets.Version("0.0.1"),
|
41 |
-
name=lang,
|
42 |
-
description=f"mMARCO bilingual-training datasets for {lang}"
|
43 |
-
) for lang in languages
|
44 |
-
]
|
45 |
-
|
46 |
-
def _info(self):
|
47 |
-
features = datasets.Features({
|
48 |
-
'query_id': datasets.Value('string'),
|
49 |
-
'query_source': datasets.Value('string'),
|
50 |
-
'query_target': datasets.Value('string'),
|
51 |
-
'positive_passages_source': [
|
52 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
53 |
-
],
|
54 |
-
'positive_passages_target': [
|
55 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
56 |
-
],
|
57 |
-
'negative_passages_source': [
|
58 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
59 |
-
],
|
60 |
-
'negative_passages_target': [
|
61 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
62 |
-
]
|
63 |
-
})
|
64 |
-
return datasets.DatasetInfo(
|
65 |
-
# This is the description that will appear on the datasets page.
|
66 |
-
description=_DESCRIPTION,
|
67 |
-
# This defines the different columns of the dataset and their types
|
68 |
-
features=features, # Here we define them above because they are different between the two configurations
|
69 |
-
supervised_keys=None,
|
70 |
-
# Homepage of the dataset for documentation
|
71 |
-
homepage="",
|
72 |
-
# License for the dataset if available
|
73 |
-
license="",
|
74 |
-
# Citation for the dataset
|
75 |
-
citation=_CITATION,
|
76 |
-
)
|
77 |
-
|
78 |
-
def _split_generators(self, dl_manager):
|
79 |
-
lang = self.config.name
|
80 |
-
downloaded_files = dl_manager.download_and_extract(_DATASET_URLS[lang])
|
81 |
-
'''
|
82 |
-
if self.config.data_files:
|
83 |
-
downloaded_files = self.config.data_files
|
84 |
-
else:
|
85 |
-
downloaded_files = dl_manager.download_and_extract(_DATASET_URLS)
|
86 |
-
'''
|
87 |
-
splits = [
|
88 |
-
datasets.SplitGenerator(
|
89 |
-
name=split,
|
90 |
-
gen_kwargs={
|
91 |
-
"files": [downloaded_files[split]] if isinstance(downloaded_files[split], str) else
|
92 |
-
downloaded_files[split],
|
93 |
-
},
|
94 |
-
) for split in downloaded_files
|
95 |
-
]
|
96 |
-
return splits
|
97 |
-
|
98 |
-
def _generate_examples(self, files):
|
99 |
-
"""Yields examples."""
|
100 |
-
for filepath in files:
|
101 |
-
with open(filepath, encoding="utf-8") as f:
|
102 |
-
for line in f:
|
103 |
-
data = json.loads(line)
|
104 |
-
if data.get('negative_passages_source') is None:
|
105 |
-
data['negative_passages_source'] = []
|
106 |
-
data['negative_passages_target'] = []
|
107 |
-
if data.get('positive_passages_source') is None:
|
108 |
-
data['positive_passages_source'] = []
|
109 |
-
data['positive_passages_target'] = []
|
110 |
-
yield data['query_id'], data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spanish.json.gz → spanish/mmarco-train-bi-train-00000-of-00020.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b911d3b8c21969917c0741706b7186a29a90d376df3462e6ce8fd98b39575c44
|
3 |
+
size 288452142
|
spanish/mmarco-train-bi-train-00001-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69f59aee9eddbd285937100c940b2414efc002c0461b79a1055322902733475b
|
3 |
+
size 287315515
|
spanish/mmarco-train-bi-train-00002-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3a6c938c9d51c6e264d1f26a6e32815355876c570af245116d8ad7f180749a28
|
3 |
+
size 288230829
|
spanish/mmarco-train-bi-train-00003-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a30771c00a3c191793f0fee6e0ee53c173da0c9ceaa1388d244b5a53b13560e
|
3 |
+
size 287744762
|
spanish/mmarco-train-bi-train-00004-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d5d47d3a90f2dc8556457cb45395560f04a358e8cf08886e4c09768318a53fe
|
3 |
+
size 288204216
|
spanish/mmarco-train-bi-train-00005-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9cdbd0bc15023bf29c24ae38b57a3dd71dfb24cacc8319c93d0eb5d171e5f8b7
|
3 |
+
size 288229944
|
spanish/mmarco-train-bi-train-00006-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e8d4469434cd7dbe3b0d6044e44522028b4f92cb11ae409584e5f371574d8c39
|
3 |
+
size 288725464
|
spanish/mmarco-train-bi-train-00007-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:448cf0731ef81d99dff3fc3735fa39564da15fd1dc61713b3f53519f83131cba
|
3 |
+
size 287941156
|
spanish/mmarco-train-bi-train-00008-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7f85314cb2bba82ad81a47bc66b9a49119b99b3d3558b475dfcf0a06ae2315b4
|
3 |
+
size 288095500
|
spanish/mmarco-train-bi-train-00009-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fdc9c4d3314c63c81da6ddb55c9d48964dda6d5e50fed475a959d2f58c70d666
|
3 |
+
size 288078663
|
spanish/mmarco-train-bi-train-00010-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a7e8eff1f6ae1d0d557be459c41d50040fe54ae3a5256e283310e332976bc040
|
3 |
+
size 287686853
|
spanish/mmarco-train-bi-train-00011-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e46d7ce49860b63436f979f011f9fa52e9d117d3e71eb9269e9a2629ee83f1c
|
3 |
+
size 288190161
|
spanish/mmarco-train-bi-train-00012-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:94bad0abdf9a13e720439b6f39454d654ee59c693f335e5099e6c112332c707d
|
3 |
+
size 287909101
|
spanish/mmarco-train-bi-train-00013-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7514b3c51bbb643c4670b7d8c56ca5ae9e011b2a4b72e5f11185f43a9b19a1ec
|
3 |
+
size 287910472
|
spanish/mmarco-train-bi-train-00014-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80c6071635f8affc597770f78030f60798c193cecb5bb3f5ca9107bfe0f8d127
|
3 |
+
size 287494032
|
spanish/mmarco-train-bi-train-00015-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7aacc5878fc4f9bda240426daaa62cf68bb31ea772dca0a4034fda99d615b925
|
3 |
+
size 287982851
|
spanish/mmarco-train-bi-train-00016-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c732e0df1af2f93495083f99598008db12e14c1a91927814d126b330f91f2ca6
|
3 |
+
size 288153450
|
spanish/mmarco-train-bi-train-00017-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e89d4514fbd03a3df9a36f547b5d7e07cd2260e467ece15fc19b90e90fff7b46
|
3 |
+
size 287909734
|
spanish/mmarco-train-bi-train-00018-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:19d4c13d274c4eb5dfe2373f98560b9b41346ac32b67650b0f4e236acaf56d7e
|
3 |
+
size 288801214
|
spanish/mmarco-train-bi-train-00019-of-00020.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae7c7b80241567890f4ae4183a5734a8e245758df89997836ede324af9969be6
|
3 |
+
size 270347738
|