Commit
·
82829fd
1
Parent(s):
13668a5
init
Browse files- .gitattributes +1 -0
- README.md +28 -0
- neuclir-2023.py +109 -0
- neuclir-fas/corpus.jsonl +3 -0
- neuclir-fas/queries.jsonl +3 -0
- neuclir-fas/test.jsonl +3 -0
- neuclir-rus/corpus.jsonl +3 -0
- neuclir-rus/queries.jsonl +3 -0
- neuclir-rus/test.jsonl +3 -0
- neuclir-zho/corpus.jsonl +3 -0
- neuclir-zho/queries.jsonl +3 -0
- neuclir-zho/test.jsonl +3 -0
.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 2023: https://arxiv.org/abs/2304.12367
|
17 |
+
|
18 |
+
Generated from https://huggingface.co/datasets/neuclir/neuclir1
|
19 |
+
|
20 |
+
```
|
21 |
+
@article{lawrie2024overview,
|
22 |
+
title={Overview of the TREC 2023 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 |
+
url={https://trec.nist.gov/pubs/trec32/papers/Overview_neuclir.pdf},
|
25 |
+
year={2024}
|
26 |
+
}
|
27 |
+
```
|
28 |
+
|
neuclir-2023.py
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
import datasets
|
4 |
+
|
5 |
+
_CITATION = '''
|
6 |
+
@article{lawrie2024overview,
|
7 |
+
title={Overview of the TREC 2023 NeuCLIR track},
|
8 |
+
author={Lawrie, Dawn and MacAvaney, Sean and Mayfield, James and McNamee, Paul and Oard, Douglas W and Soldaini, Luca and Yang, Eugene},
|
9 |
+
year={2024}
|
10 |
+
}
|
11 |
+
'''
|
12 |
+
|
13 |
+
_LANGUAGES = [
|
14 |
+
'rus',
|
15 |
+
'fas',
|
16 |
+
'zho',
|
17 |
+
]
|
18 |
+
|
19 |
+
_DESCRIPTION = 'dataset load script for NeuCLIR 2023'
|
20 |
+
|
21 |
+
_DATASET_URLS = {
|
22 |
+
lang: {
|
23 |
+
'test': f'https://huggingface.co/datasets/MTEB/neuclir-2023/resolve/main/neuclir-{lang}/queries.jsonl',
|
24 |
+
} for lang in _LANGUAGES
|
25 |
+
}
|
26 |
+
|
27 |
+
_DATASET_CORPUS_URLS = {
|
28 |
+
f'corpus-{lang}': {
|
29 |
+
'corpus': f'https://huggingface.co/datasets/MTEB/neuclir-2023/resolve/main/neuclir-{lang}/corpus.jsonl'
|
30 |
+
} for lang in _LANGUAGES
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
class MLDR(datasets.GeneratorBasedBuilder):
|
35 |
+
BUILDER_CONFIGS = [datasets.BuilderConfig(
|
36 |
+
version=datasets.Version('1.0.0'),
|
37 |
+
name=lang, description=f'NeuCLIR dataset in language {lang}.'
|
38 |
+
) for lang in _LANGUAGES
|
39 |
+
] + [
|
40 |
+
datasets.BuilderConfig(
|
41 |
+
version=datasets.Version('1.0.0'),
|
42 |
+
name=f'corpus-{lang}', description=f'corpus of NeuCLIR dataset in language {lang}.'
|
43 |
+
) for lang in _LANGUAGES
|
44 |
+
]
|
45 |
+
|
46 |
+
def _info(self):
|
47 |
+
name = self.config.name
|
48 |
+
if name.startswith('corpus-'):
|
49 |
+
features = datasets.Features({
|
50 |
+
'_id': datasets.Value('string'),
|
51 |
+
'text': datasets.Value('string'),
|
52 |
+
})
|
53 |
+
else:
|
54 |
+
features = datasets.Features({
|
55 |
+
'_id': datasets.Value('string'),
|
56 |
+
'query': datasets.Value('string'),
|
57 |
+
})
|
58 |
+
|
59 |
+
return datasets.DatasetInfo(
|
60 |
+
# This is the description that will appear on the datasets page.
|
61 |
+
description=_DESCRIPTION,
|
62 |
+
# This defines the different columns of the dataset and their types
|
63 |
+
features=features, # Here we define them above because they are different between the two configurations
|
64 |
+
supervised_keys=None,
|
65 |
+
# Homepage of the dataset for documentation
|
66 |
+
homepage='https://arxiv.org/abs/2304.12367',
|
67 |
+
# License for the dataset if available
|
68 |
+
license=None,
|
69 |
+
# Citation for the dataset
|
70 |
+
citation=_CITATION,
|
71 |
+
)
|
72 |
+
|
73 |
+
def _split_generators(self, dl_manager):
|
74 |
+
name = self.config.name
|
75 |
+
if name.startswith('corpus-'):
|
76 |
+
downloaded_files = dl_manager.download_and_extract(_DATASET_CORPUS_URLS[name])
|
77 |
+
splits = [
|
78 |
+
datasets.SplitGenerator(
|
79 |
+
name='corpus',
|
80 |
+
gen_kwargs={
|
81 |
+
'filepath': downloaded_files['corpus'],
|
82 |
+
},
|
83 |
+
),
|
84 |
+
]
|
85 |
+
else:
|
86 |
+
downloaded_files = dl_manager.download_and_extract(_DATASET_URLS[name])
|
87 |
+
splits = [
|
88 |
+
datasets.SplitGenerator(
|
89 |
+
name='test',
|
90 |
+
gen_kwargs={
|
91 |
+
'filepath': downloaded_files['test'],
|
92 |
+
},
|
93 |
+
),
|
94 |
+
]
|
95 |
+
return splits
|
96 |
+
|
97 |
+
def _generate_examples(self, filepath):
|
98 |
+
name = self.config.name
|
99 |
+
if name.startswith('corpus-'):
|
100 |
+
with open(filepath, encoding='utf-8') as f:
|
101 |
+
for line in f:
|
102 |
+
data = json.loads(line)
|
103 |
+
yield data['docid'], data
|
104 |
+
else:
|
105 |
+
with open(filepath, encoding="utf-8") as f:
|
106 |
+
for line in f:
|
107 |
+
data = json.loads(line)
|
108 |
+
qid = data['query_id']
|
109 |
+
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:a9f6eacf0e37f1ac56ddda967ee73a4e9e2d56caaa0b4701187d57d39d48442c
|
3 |
+
size 26608
|
neuclir-fas/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dac898b6772f38736a28d9ef410b324413773366524b130a35a918b622a97787
|
3 |
+
size 2132960
|
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:ab0ec50ea8b119c51d0c0d69cc86a41e63a42c4da908fc62ec7a96b2f0ce1fe5
|
3 |
+
size 31041
|
neuclir-rus/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf8e91e9c0c6ec1f26f155be606081dabf55a04b5dd1cbe3c2ce197fc9d1cd37
|
3 |
+
size 2050720
|
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:8d8eff48f7fd07ac31ce9a5640dbc78f30511a84dbdcc7d096e484a5112f04e4
|
3 |
+
size 11188
|
neuclir-zho/test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d61938fb0a2dc0050f49d400ae775cf107f382f793a9ca3499f5633c36430918
|
3 |
+
size 2211040
|