orionweller commited on
Commit
d78464b
·
1 Parent(s): 1f6171a

added all with msmarco

Browse files
.gitattributes CHANGED
@@ -56,3 +56,29 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
+ cqadupstack-android.jsonl.gz filter=lfs diff=lfs merge=lfs -text
60
+ cqadupstack-gaming.jsonl.gz filter=lfs diff=lfs merge=lfs -text
61
+ cqadupstack-gis.jsonl.gz filter=lfs diff=lfs merge=lfs -text
62
+ cqadupstack-unix.jsonl.gz filter=lfs diff=lfs merge=lfs -text
63
+ fiqa.jsonl.gz filter=lfs diff=lfs merge=lfs -text
64
+ scidocs.jsonl.gz filter=lfs diff=lfs merge=lfs -text
65
+ arguana.jsonl.gz filter=lfs diff=lfs merge=lfs -text
66
+ climate-fever.jsonl.gz filter=lfs diff=lfs merge=lfs -text
67
+ trec-covid.jsonl.gz filter=lfs diff=lfs merge=lfs -text
68
+ dbpedia-entity.jsonl.gz filter=lfs diff=lfs merge=lfs -text
69
+ fever.jsonl.gz filter=lfs diff=lfs merge=lfs -text
70
+ nq.jsonl.gz filter=lfs diff=lfs merge=lfs -text
71
+ cqadupstack-english.jsonl.gz filter=lfs diff=lfs merge=lfs -text
72
+ cqadupstack-tex.jsonl.gz filter=lfs diff=lfs merge=lfs -text
73
+ cqadupstack-wordpress.jsonl.gz filter=lfs diff=lfs merge=lfs -text
74
+ hotpotqa.jsonl.gz filter=lfs diff=lfs merge=lfs -text
75
+ quora.jsonl.gz filter=lfs diff=lfs merge=lfs -text
76
+ webis-touche2020.jsonl.gz filter=lfs diff=lfs merge=lfs -text
77
+ cqadupstack-mathematica.jsonl.gz filter=lfs diff=lfs merge=lfs -text
78
+ cqadupstack-stats.jsonl.gz filter=lfs diff=lfs merge=lfs -text
79
+ cqadupstack-webmasters.jsonl.gz filter=lfs diff=lfs merge=lfs -text
80
+ msmarco.jsonl.gz filter=lfs diff=lfs merge=lfs -text
81
+ nfcorpus.jsonl.gz filter=lfs diff=lfs merge=lfs -text
82
+ scifact.jsonl.gz filter=lfs diff=lfs merge=lfs -text
83
+ cqadupstack-physics.jsonl.gz filter=lfs diff=lfs merge=lfs -text
84
+ cqadupstack-programmers.jsonl.gz filter=lfs diff=lfs merge=lfs -text
arguana.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d62e7e62bd662e18383dd58922a09839ced90f0d3a44dfa6024e2f358518880f
3
+ size 3140877
beir-corpus.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
16
+ # Lint as: python3
17
+
18
+ import json
19
+
20
+ import datasets
21
+
22
+ _CITATION = '''
23
+ @inproceedings{
24
+ thakur2021beir,
25
+ title={{BEIR}: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models},
26
+ author={Nandan Thakur and Nils Reimers and Andreas R{\"u}ckl{\'e} and Abhishek Srivastava and Iryna Gurevych},
27
+ booktitle={Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2)},
28
+ year={2021},
29
+ url={https://openreview.net/forum?id=wCu6T5xFjeJ}
30
+ }
31
+ '''
32
+
33
+ all_data = [
34
+ 'arguana',
35
+ 'climate-fever',
36
+ 'cqadupstack-android',
37
+ 'cqadupstack-english',
38
+ 'cqadupstack-gaming',
39
+ 'cqadupstack-gis',
40
+ 'cqadupstack-mathematica',
41
+ 'cqadupstack-physics',
42
+ 'cqadupstack-programmers',
43
+ 'cqadupstack-stats',
44
+ 'cqadupstack-tex',
45
+ 'cqadupstack-unix',
46
+ 'cqadupstack-webmasters',
47
+ 'cqadupstack-wordpress',
48
+ 'dbpedia-entity',
49
+ 'fever',
50
+ 'fiqa',
51
+ 'hotpotqa',
52
+ 'msmarco',
53
+ 'nfcorpus',
54
+ 'quora',
55
+ 'scidocs',
56
+ 'scifact',
57
+ 'trec-covid',
58
+ 'webis-touche2020',
59
+ 'nq'
60
+ ]
61
+
62
+ _DESCRIPTION = 'dataset load script for BEIR corpus'
63
+
64
+ _DATASET_URLS = {
65
+ data: {
66
+ 'train': f'https://huggingface.co/datasets/Tevatron/beir-corpus/resolve/main/{data}.jsonl.gz',
67
+ } for data in all_data
68
+ }
69
+
70
+
71
+ class BeirCorpus(datasets.GeneratorBasedBuilder):
72
+ BUILDER_CONFIGS = [
73
+ datasets.BuilderConfig(
74
+ version=datasets.Version('1.1.0'),
75
+ name=data,
76
+ description=f'BEIR dataset corpus {data}.'
77
+ ) for data in all_data
78
+ ]
79
+
80
+ def _info(self):
81
+ features = datasets.Features({
82
+ 'docid': datasets.Value('string'),
83
+ 'title': datasets.Value('string'),
84
+ 'text': datasets.Value('string'),
85
+ })
86
+
87
+ return datasets.DatasetInfo(
88
+ # This is the description that will appear on the datasets page.
89
+ description=_DESCRIPTION,
90
+ # This defines the different columns of the dataset and their types
91
+ features=features, # Here we define them above because they are different between the two configurations
92
+ supervised_keys=None,
93
+ # Homepage of the dataset for documentation
94
+ homepage='https://github.com/beir-cellar/beir',
95
+ # License for the dataset if available
96
+ license='',
97
+ # Citation for the dataset
98
+ citation=_CITATION,
99
+ )
100
+
101
+ def _split_generators(self, dl_manager):
102
+ data = self.config.name
103
+ downloaded_files = dl_manager.download_and_extract(_DATASET_URLS[data])
104
+
105
+ splits = [
106
+ datasets.SplitGenerator(
107
+ name='train',
108
+ gen_kwargs={
109
+ 'filepath': downloaded_files['train'],
110
+ },
111
+ ),
112
+ ]
113
+ return splits
114
+
115
+ def _generate_examples(self, filepath):
116
+ with open(filepath, encoding="utf-8") as f:
117
+ for line in f:
118
+ data = json.loads(line)
119
+ if "_id" in data:
120
+ data['docid'] = data.pop('_id')
121
+ yield data['docid'], data
climate-fever.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a13cbe7c16e1173df1be3829add523ce7a96755d9c626641eacc55f126ef90ad
3
+ size 1223011539
cqadupstack-android.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1088b26a3c88401d49a6c7c977f68a4c006d69464df4291bb772d9636c661ad
3
+ size 5160669
cqadupstack-english.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe078c0bb8f86ff935fe793ac39fb73c81f6f981f5d3c174f1cdf4dd5bcbaabf
3
+ size 7665925
cqadupstack-gaming.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58bb8eb03c17ec4368391c766a55951b44182cfd4339b05d34bfdaf52269f770
3
+ size 8796079
cqadupstack-gis.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:602e188fffa76ac7ca2d2fd097d82878998d382e66ca63538908218d602b8289
3
+ size 13632244
cqadupstack-mathematica.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddc52c8bdbbeae002c6419468980fcab1f2ced98aab0822e5d6e0768b0cb73b6
3
+ size 6992481
cqadupstack-physics.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b55c5cbe72418c567d7ac185d259d18e1423fc9343f6157f33dc6b210688ed6e
3
+ size 11821668
cqadupstack-programmers.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2779027fdaaa5f578d9b8fe6488937bc3a042e387e927f20dbd0135ac1edf90d
3
+ size 12668400
cqadupstack-stats.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3ce74fe9bf8024deb09f1dd6c1812daa1674a3faf0a9a5fce219b2d21c90077
3
+ size 16369368
cqadupstack-tex.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f1106386ef34c0ded67eb7207cd6cc13b7e6b0add2e9e607dac8092f5d2975f
3
+ size 28984419
cqadupstack-unix.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b3ba99034e972fea78f89af96319a4af0f17726daeaf1f99e11aa680a27a345
3
+ size 16747098
cqadupstack-webmasters.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbcb2e566a19bc61c65ccd85e34a7a76904a810d7e4ddccda3d531c2166137c6
3
+ size 4637271
cqadupstack-wordpress.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:743665d4407fbbcaea80e4c3ae243a3cfce0d09ca47d85c4c86f36a66ae9d44e
3
+ size 17686345
dbpedia-entity.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c678c5ac765ff621b47e0392d25f9322eca952764792c7d40cf15b67a3411d2b
3
+ size 602962730
fever.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa3f9a7fd079317258e3d708b51011a01b2629c338c5da339b56783178d601b3
3
+ size 1222991961
fiqa.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8e55442b8545d92b9ebc3c847438fc4d92c6563993732aaa4f85aaaafb71a3d
3
+ size 17617057
hotpotqa.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27a57d38c04b9e02f0babbd9ea4192f9464bc0f519640757b82fcfbf0a5bcb11
3
+ size 608690204
msmarco.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40d6b1dec7d9c68357298e5a75cba6b8086987dc205bad88652706bead9b692f
3
+ size 1068250131
nfcorpus.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f099c7b1d3d110f8903ffdb29f5fd1036651ea3989090c5999ac14de198b054f
3
+ size 1935568
nq.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83ee077d2065a4e95f892e1efcc5d0cbce9310651eecbd8bb3825dc3378ff377
3
+ size 496731199
quora.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4740ec9e32d9fa9747b472e5665c354aa2624eccc695f76fbf0f31f6da4637c
3
+ size 15099900
scidocs.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:671dc9d162f08e3050fd2fa187093e4620a4ad5cc02357db4de0f1ec483a3f7a
3
+ size 11857707
scifact.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dd268826be9694e5e369bcc426551e1ae8cc6651a8fa69186475e20effae841
3
+ size 2753754
trec-covid.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc82a143b7be7f9f0bdf0b89488988b677bd744363dfbb50a641487f75bcb37
3
+ size 69125743
webis-touche2020.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e939aa9872922e3a6fdda78db70c31d891683e003646d86874f91597477ee9e
3
+ size 223889692