Datasets:
mteb
/

ArXiv:
orionweller commited on
Commit
51beb38
1 Parent(s): 55db614
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - fas
4
+ - rus
5
+ - zho
6
+
7
+
8
+ multilinguality:
9
+ - multilingual
10
+
11
+ task_categories:
12
+ - text-retrieval
13
+
14
+ ---
15
+
16
+ From the NeuCLIR TREC Track 2022: https://arxiv.org/abs/2304.12367
17
+
18
+ Generated from https://huggingface.co/datasets/neuclir/neuclir1
19
+
20
+ ```
21
+ @article{lawrie2023overview,
22
+ title={Overview of the TREC 2022 NeuCLIR track},
23
+ author={Lawrie, Dawn and MacAvaney, Sean and Mayfield, James and McNamee, Paul and Oard, Douglas W and Soldaini, Luca and Yang, Eugene},
24
+ journal={arXiv preprint arXiv:2304.12367},
25
+ year={2023}
26
+ }
27
+ ```
28
+
neuclir-2022.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ @article{lawrie2023overview,
24
+ title={Overview of the TREC 2022 NeuCLIR track},
25
+ author={Lawrie, Dawn and MacAvaney, Sean and Mayfield, James and McNamee, Paul and Oard, Douglas W and Soldaini, Luca and Yang, Eugene},
26
+ journal={arXiv preprint arXiv:2304.12367},
27
+ year={2023}
28
+ }
29
+ '''
30
+
31
+ _LANGUAGES = [
32
+ 'rus',
33
+ 'fas',
34
+ 'zho',
35
+ ]
36
+
37
+ _DESCRIPTION = 'dataset load script for NeuCLIR 2022'
38
+
39
+ _DATASET_URLS = {
40
+ lang: {
41
+ 'test': f'https://huggingface.co/datasets/MTEB/neuclir-2022/resolve/main/neuclir-{lang}/queries.jsonl.gz',
42
+ } for lang in _LANGUAGES
43
+ }
44
+
45
+ _DATASET_CORPUS_URLS = {
46
+ f'corpus-{lang}': {
47
+ 'corpus': f'https://huggingface.co/datasets/MTEB/neuclir-2022/resolve/main/neuclir-{lang}/corpus.jsonl.gz'
48
+ } for lang in _LANGUAGES
49
+ }
50
+
51
+
52
+ class MLDR(datasets.GeneratorBasedBuilder):
53
+ BUILDER_CONFIGS = [datasets.BuilderConfig(
54
+ version=datasets.Version('1.0.0'),
55
+ name=lang, description=f'MLDR dataset in language {lang}.'
56
+ ) for lang in _LANGUAGES
57
+ ] + [
58
+ datasets.BuilderConfig(
59
+ version=datasets.Version('1.0.0'),
60
+ name=f'corpus-{lang}', description=f'corpus of MLDR dataset in language {lang}.'
61
+ ) for lang in _LANGUAGES
62
+ ]
63
+
64
+ def _info(self):
65
+ name = self.config.name
66
+ if name.startswith('corpus-'):
67
+ features = datasets.Features({
68
+ '_id': datasets.Value('string'),
69
+ 'text': datasets.Value('string'),
70
+ })
71
+ else:
72
+ features = datasets.Features({
73
+ '_id': datasets.Value('string'),
74
+ 'query': datasets.Value('string'),
75
+ })
76
+
77
+ return datasets.DatasetInfo(
78
+ # This is the description that will appear on the datasets page.
79
+ description=_DESCRIPTION,
80
+ # This defines the different columns of the dataset and their types
81
+ features=features, # Here we define them above because they are different between the two configurations
82
+ supervised_keys=None,
83
+ # Homepage of the dataset for documentation
84
+ homepage='https://github.com/FlagOpen/FlagEmbedding',
85
+ # License for the dataset if available
86
+ license='mit',
87
+ # Citation for the dataset
88
+ citation=_CITATION,
89
+ )
90
+
91
+ def _split_generators(self, dl_manager):
92
+ name = self.config.name
93
+ if name.startswith('corpus-'):
94
+ downloaded_files = dl_manager.download_and_extract(_DATASET_CORPUS_URLS[name])
95
+ splits = [
96
+ datasets.SplitGenerator(
97
+ name='corpus',
98
+ gen_kwargs={
99
+ 'filepath': downloaded_files['corpus'],
100
+ },
101
+ ),
102
+ ]
103
+ else:
104
+ downloaded_files = dl_manager.download_and_extract(_DATASET_URLS[name])
105
+ splits = [
106
+ datasets.SplitGenerator(
107
+ name='test',
108
+ gen_kwargs={
109
+ 'filepath': downloaded_files['test'],
110
+ },
111
+ ),
112
+ ]
113
+ return splits
114
+
115
+ def _generate_examples(self, filepath):
116
+ name = self.config.name
117
+ if name.startswith('corpus-'):
118
+ with open(filepath, encoding='utf-8') as f:
119
+ for line in f:
120
+ data = json.loads(line)
121
+ yield data['docid'], data
122
+ else:
123
+ with open(filepath, encoding="utf-8") as f:
124
+ for line in f:
125
+ data = json.loads(line)
126
+ qid = data['query_id']
127
+ yield qid, data
neuclir-fas/corpus.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d6194f65fa4cf649770a0267e62ed2ef320707db75dfb0f71507c31c085a7dc
3
+ size 22694205427
neuclir-fas/queries.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16186ddcf3c8d0948b56714ef3e8474ea22b87a3c8cb6b730396d146a6a7b202
3
+ size 51468
neuclir-fas/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6f00fc54ac00467722be9bdeb3184940e04583993835f7d58001a6855f518af
3
+ size 2704938
neuclir-rus/corpus.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7337f9952cc6f19c6a1e6034f4a90e8c5fc98a017763679fbca2f145809e11a1
3
+ size 41245591284
neuclir-rus/queries.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd670254400bf5de6baf780c9d94ad201e20791d8c4742049506e0027606f36c
3
+ size 53437
neuclir-rus/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a7a650f7baa52c790285dba8de5d707affe9c598ddbcf6de4c7d6fdefbc8eef
3
+ size 2610324
neuclir-zho/corpus.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a5c97300ca6805380ea88d809613aa1aef051089fe683aeb07b955a574c633d
3
+ size 12681814438
neuclir-zho/queries.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7df87e889e83306b237e7dec96ed764bab684554debf387779a50468cc5be8f7
3
+ size 18444
neuclir-zho/test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d38b66c1bf7ef9142b5e577ef78015e41494e6962f03fd0985a1d257914b6d2
3
+ size 2894321