parquet-converter
commited on
Commit
•
eb411ed
1
Parent(s):
d1cde9f
Update parquet files
Browse files- .gitattributes +0 -38
- default/msmarco-passage-query-variation-dev.parquet +3 -0
- dev.jsonl +0 -0
- msmarco-passage-query-variation.py +0 -114
.gitattributes
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
19 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
-
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
# Audio files - uncompressed
|
29 |
-
*.pcm filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.sam filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.raw filter=lfs diff=lfs merge=lfs -text
|
32 |
-
# Audio files - compressed
|
33 |
-
*.aac filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.flac filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
36 |
-
*.ogg filter=lfs diff=lfs merge=lfs -text
|
37 |
-
*.wav filter=lfs diff=lfs merge=lfs -text
|
38 |
-
dev.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default/msmarco-passage-query-variation-dev.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fc2ce5fd0f75ba88ca5f5f84d2cab8b092ed2e85c5853d6177481b73506ce3c
|
3 |
+
size 2179498
|
dev.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
msmarco-passage-query-variation.py
DELETED
@@ -1,114 +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 |
-
"""MsMarco Passage dataset."""
|
18 |
-
|
19 |
-
import json
|
20 |
-
|
21 |
-
import datasets
|
22 |
-
|
23 |
-
_CITATION = """
|
24 |
-
@misc{bajaj2018ms,
|
25 |
-
title={MS MARCO: A Human Generated MAchine Reading COmprehension Dataset},
|
26 |
-
author={Payal Bajaj and Daniel Campos and Nick Craswell and Li Deng and Jianfeng Gao and Xiaodong Liu
|
27 |
-
and Rangan Majumder and Andrew McNamara and Bhaskar Mitra and Tri Nguyen and Mir Rosenberg and Xia Song
|
28 |
-
and Alina Stoica and Saurabh Tiwary and Tong Wang},
|
29 |
-
year={2018},
|
30 |
-
eprint={1611.09268},
|
31 |
-
archivePrefix={arXiv},
|
32 |
-
primaryClass={cs.CL}
|
33 |
-
}
|
34 |
-
"""
|
35 |
-
|
36 |
-
_DESCRIPTION = "dataset load script for MSMARCO Passage query variation"
|
37 |
-
|
38 |
-
_DATASET_URLS = {
|
39 |
-
# 'train': "https://huggingface.co/datasets/spacemaniol/msmarco-passage-query-variation/resolve/main/train.jsonl",
|
40 |
-
#'train': "https://www.dropbox.com/s/seqqbu90jopvtq5/msmarco_passage_train.json",
|
41 |
-
'dev': "https://huggingface.co/datasets/spacemanidol/msmarco-passage-query-variation/resolve/main/dev.jsonl",
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
class MsMarcoPassage(datasets.GeneratorBasedBuilder):
|
46 |
-
VERSION = datasets.Version("0.0.1")
|
47 |
-
|
48 |
-
BUILDER_CONFIGS = [
|
49 |
-
datasets.BuilderConfig(version=VERSION,
|
50 |
-
description="MS MARCO passage train/dev datasets with query variation"),
|
51 |
-
]
|
52 |
-
|
53 |
-
def _info(self):
|
54 |
-
features = datasets.Features({
|
55 |
-
'query_id': datasets.Value('string'),
|
56 |
-
'query': datasets.Value('string'),
|
57 |
-
"query-inject-det": datasets.Value('string'),
|
58 |
-
"query-synonym": datasets.Value('string'),
|
59 |
-
"query-lemmatize": datasets.Value('string'),
|
60 |
-
"query-stem":datasets.Value('string'),
|
61 |
-
"query-random-char-swap": datasets.Value('string'),
|
62 |
-
"query-char-keyboard": datasets.Value('string'),
|
63 |
-
"query-char-delete": datasets.Value('string'),
|
64 |
-
"query-reorder-words": datasets.Value('string'),
|
65 |
-
"query-backtranslation": datasets.Value('string'),
|
66 |
-
"query-paraphrase": datasets.Value('string'),
|
67 |
-
'positive_passages': [
|
68 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
69 |
-
],
|
70 |
-
'negative_passages': [
|
71 |
-
{'docid': datasets.Value('string'), 'title': datasets.Value('string'), 'text': datasets.Value('string')}
|
72 |
-
],
|
73 |
-
})
|
74 |
-
return datasets.DatasetInfo(
|
75 |
-
# This is the description that will appear on the datasets page.
|
76 |
-
description=_DESCRIPTION,
|
77 |
-
# This defines the different columns of the dataset and their types
|
78 |
-
features=features, # Here we define them above because they are different between the two configurations
|
79 |
-
supervised_keys=None,
|
80 |
-
# Homepage of the dataset for documentation
|
81 |
-
homepage="",
|
82 |
-
# License for the dataset if available
|
83 |
-
license="",
|
84 |
-
# Citation for the dataset
|
85 |
-
citation=_CITATION,
|
86 |
-
)
|
87 |
-
|
88 |
-
def _split_generators(self, dl_manager):
|
89 |
-
if self.config.data_files:
|
90 |
-
downloaded_files = self.config.data_files
|
91 |
-
else:
|
92 |
-
downloaded_files = dl_manager.download_and_extract(_DATASET_URLS)
|
93 |
-
splits = [
|
94 |
-
datasets.SplitGenerator(
|
95 |
-
name=split,
|
96 |
-
gen_kwargs={
|
97 |
-
"files": [downloaded_files[split]] if isinstance(downloaded_files[split], str) else downloaded_files[split],
|
98 |
-
},
|
99 |
-
) for split in downloaded_files
|
100 |
-
]
|
101 |
-
return splits
|
102 |
-
|
103 |
-
def _generate_examples(self, files):
|
104 |
-
"""Yields examples."""
|
105 |
-
for filepath in files:
|
106 |
-
with open(filepath) as f:
|
107 |
-
for line in f:
|
108 |
-
data = json.loads(line)
|
109 |
-
if data.get('negative_passages') is None:
|
110 |
-
data['negative_passages'] = []
|
111 |
-
if data.get('positive_passages') is None:
|
112 |
-
data['positive_passages'] = []
|
113 |
-
yield data['query_id'], data
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|