Hyukkyu commited on
Commit
c556d02
·
verified ·
1 Parent(s): cd0d968

build NFCorpus from mteb/nfcorpus@ec0fa4fe · rteb_open v0.1.0

Browse files
README.md CHANGED
@@ -1,114 +1,96 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
3
  task_categories:
4
- - information-retrieval
5
  - text-retrieval
 
 
6
  tags:
7
  - beir
8
- - nfcorpus
9
- - information-retrieval
10
  - retrieval
11
- - search
12
  configs:
13
  - config_name: corpus
14
  data_files:
 
 
 
 
 
 
15
  - split: train
16
- path: corpus/train-*
 
 
17
  - config_name: queries
18
  data_files:
 
 
19
  - split: train
20
- path: queries/train-*
21
- dataset_info:
22
- - config_name: corpus
23
- features:
24
- - name: title
25
- dtype: string
26
- - name: text
27
- dtype: string
28
- - name: _id
29
- dtype: string
30
- splits:
31
- - name: train
32
- num_bytes: 5856698
33
- num_examples: 3633
34
- download_size: 3178637
35
- dataset_size: 5856698
36
- - config_name: queries
37
- features:
38
- - name: title
39
- dtype: string
40
- - name: text
41
- dtype: string
42
- - name: _id
43
- dtype: string
44
- splits:
45
- - name: train
46
- num_bytes: 141303
47
- num_examples: 3237
48
- download_size: 80445
49
- dataset_size: 141303
50
  ---
51
-
52
- # BEIR NFCORPUS Dataset (Migrated)
53
-
54
- This is a migrated version of BeIR/nfcorpus that is compatible with datasets library 4.0.0+.
55
-
56
- ## Dataset Description
57
-
58
- This dataset contains the nfcorpus dataset from the BEIR benchmark, converted from the old script-based format to Parquet format.
59
-
60
- ## Dataset Structure
61
-
62
- ### Queries
63
-
64
- - **Split 'queries'**: 3,237 examples
65
- - Features: ['_id', 'title', 'text']
66
-
67
- - **Total examples**: 3,237
68
-
69
-
70
- ### Corpus
71
-
72
- - **Split 'corpus'**: 3,633 examples
73
- - Features: ['_id', 'title', 'text']
74
-
75
- - **Total examples**: 3,633
76
-
77
-
78
- ## Usage
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  ```python
81
  from datasets import load_dataset
82
-
83
- # Load queries (split: queries)
84
- queries = load_dataset("Hyukkyu/beir-nfcorpus", "queries", split="queries")
85
-
86
- # Load corpus (split: corpus)
87
- corpus = load_dataset("Hyukkyu/beir-nfcorpus", "corpus", split="corpus")
88
  ```
89
 
 
90
 
91
- ## Available Splits
92
-
93
- ### Queries
94
- - `queries`: 3,237 examples
95
-
96
- ### Corpus
97
- - `corpus`: 3,633 examples
98
 
99
- ## Original Dataset
100
 
101
- This dataset is migrated from: BeIR/nfcorpus
 
 
102
 
103
- ## Citation
104
-
105
- If you use this dataset, please cite the original BEIR paper:
106
-
107
- ```bibtex
108
- @article{thakur2021beir,
109
- title={BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models},
110
- author={Thakur, Nandan and Reimers, Nils and Ruckle, Andreas and Srivastava, Abhishek and Gurevych, Iryna},
111
- journal={arXiv preprint arXiv:2104.08663},
112
- year={2021}
113
- }
114
- ```
 
1
  ---
2
+ pretty_name: BEIR · NFCorpus
3
+ license: cc-by-sa-4.0
4
+ language:
5
+ - en
6
+ multilinguality:
7
+ - monolingual
8
  task_categories:
 
9
  - text-retrieval
10
+ task_ids:
11
+ - document-retrieval
12
  tags:
13
  - beir
14
+ - mteb
 
15
  - retrieval
16
+ - biomedical
17
  configs:
18
  - config_name: corpus
19
  data_files:
20
+ - split: test
21
+ path: corpus/test-*.parquet
22
+ - config_name: qrels
23
+ data_files:
24
+ - split: test
25
+ path: qrels/test-*.parquet
26
  - split: train
27
+ path: qrels/train-*.parquet
28
+ - split: dev
29
+ path: qrels/dev-*.parquet
30
  - config_name: queries
31
  data_files:
32
+ - split: test
33
+ path: queries/test-*.parquet
34
  - split: train
35
+ path: queries/train-*.parquet
36
+ - split: dev
37
+ path: queries/dev-*.parquet
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  ---
39
+ # NFCorpus — BEIR, unified schema
40
+
41
+ A normalised copy of the dataset behind the `mteb` task **`NFCorpus`**, one of the tasks of the [BEIR](https://github.com/beir-cellar/beir) benchmark as `mteb` defines it. Same queries, documents
42
+ and relevance judgements as the benchmark evaluates — reshaped into one strict schema shared by every dataset
43
+ in this collection.
44
+
45
+ | | |
46
+ |---|---|
47
+ | Source | [`mteb/nfcorpus`](https://huggingface.co/datasets/mteb/nfcorpus/tree/ec0fa4fe99da2ff19ca1214b7966684033a58814) @ `ec0fa4fe99da` (the revision pinned in `mteb`) |
48
+ | Domain · languages | biomedical · eng |
49
+ | Queries / documents / qrels (all splits) | 3,237 / 3,633 / 134,294 |
50
+ | Qrels per query | min 1 · mean 38.186 · max 475 |
51
+ | Score values | 1 ×11,758, 2 ×576 |
52
+ | Layout | `queries` · `corpus` · `qrels`, split `test`; `queries`/`qrels` also carry `train`, `dev` — one shared corpus |
53
+ | Splits | `qrels`: train, dev, test · `queries`: train, dev, test |
54
+ | License | `cc-by-sa-4.0` |
55
+
56
+ ## Schema
57
+
58
+ | config | columns | rules |
59
+ |---|---|---|
60
+ | `queries` | `id: string`, `text: string` | ids unique and non-empty; every query has ≥ 1 qrel |
61
+ | `corpus` | `id: string`, `title: string`, `text: string` | `title` is always present (`""` when the source has none) |
62
+ | `qrels` | `query-id: string`, `corpus-id: string`, `score: int32` | referential integrity to both tables; no duplicate pairs; no floats |
63
+
64
+ Files are Parquet, sorted by id, zstd-compressed, sharded at 500 MB. Every rule above is enforced by a validator
65
+ before publishing; `provenance.json` records the source file hashes, what changed, and the output file hashes.
66
+
67
+ ## What changed from the source
68
+
69
+ - `dev`: dropped 2,913 queries that have no qrels in this split (mteb does the same at load time)
70
+ - `test`: dropped 2,914 queries that have no qrels in this split (mteb does the same at load time)
71
+ - `train`: dropped 647 queries that have no qrels in this split (mteb does the same at load time)
72
+ - cast `qrels.score` double -> int32
73
+ - kept 40 documents whose text is identical to another document's — a property of the source; note that models embed such documents identically and retrieval ties among them are broken by corpus order
74
+ - renamed `_id` → `id`
75
+ - renamed source splits (`queries`←`queries/queries`, `corpus`←`corpus/corpus`) to `test`
76
+
77
+ ## Load it
78
 
79
  ```python
80
  from datasets import load_dataset
81
+ queries = load_dataset("Hyukkyu/beir-nfcorpus", "queries", split="test")
82
+ corpus = load_dataset("Hyukkyu/beir-nfcorpus", "corpus", split="test")
83
+ qrels = load_dataset("Hyukkyu/beir-nfcorpus", "qrels", split="test")
 
 
 
84
  ```
85
 
86
+ ## Cross-check against the previous layout
87
 
88
+ This repo previously held the same dataset in BEIR's raw two-repo form (`Hyukkyu/beir-nfcorpus` + `Hyukkyu/beir-nfcorpus-qrels`; that layout is kept under the git tag `legacy-layout`). Before replacing it, the build was compared against it: corpus id set **identical** (3,633 documents); qrels rows per split `test` 12,334 = 12,334, `train` 110,575 = 110,575, `dev` 11,385 = 11,385.
 
 
 
 
 
 
89
 
90
+ ## License and attribution
91
 
92
+ The data is redistributed under the source's terms — `cc-by-sa-4.0`. All credit belongs to the
93
+ original authors; see the source repository and the references in `mteb`'s task metadata (https://www.cl.uni-heidelberg.de/statnlpgroup/nfcorpus/).
94
+ This repository is an independent repackaging and is not affiliated with the RTEB or MTEB maintainers.
95
 
96
+ > **License discrepancy.** The upstream dataset card declares `cc-by-sa-4.0` while `mteb`'s `TaskMetadata` declares `not specified`. This card carries the upstream value as the more conservative choice.
 
 
 
 
 
 
 
 
 
 
 
corpus/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:456c749b15ca4c6baaba5d5e3499f62cc87db34707db786146fc092fbb465830
3
+ size 2159038
provenance.json ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "task": "NFCorpus",
3
+ "benchmark": "beir",
4
+ "repo": "beir-nfcorpus",
5
+ "rteb_open_version": "0.1.0",
6
+ "source": {
7
+ "path": "mteb/nfcorpus",
8
+ "revision": "ec0fa4fe99da2ff19ca1214b7966684033a58814",
9
+ "url": "https://huggingface.co/datasets/mteb/nfcorpus/tree/ec0fa4fe99da2ff19ca1214b7966684033a58814"
10
+ },
11
+ "license": {
12
+ "card": "cc-by-sa-4.0",
13
+ "mteb_task_metadata": "not specified",
14
+ "upstream_checked": true
15
+ },
16
+ "languages": [
17
+ "eng"
18
+ ],
19
+ "domain": "biomedical",
20
+ "byte_preserving_text": false,
21
+ "layout": {
22
+ "subsets": null,
23
+ "splits": [
24
+ "test",
25
+ "train",
26
+ "dev"
27
+ ],
28
+ "split_map": {
29
+ "test": "test",
30
+ "train": "train",
31
+ "dev": "dev"
32
+ }
33
+ },
34
+ "parts": [
35
+ {
36
+ "subset": null,
37
+ "split": "test",
38
+ "source_configs": {
39
+ "queries": "queries/queries",
40
+ "corpus": "corpus/corpus",
41
+ "qrels": "default/test"
42
+ },
43
+ "normalize": {
44
+ "dropped_columns": {},
45
+ "orphan_queries_dropped": 2914,
46
+ "duplicate_qrels_collapsed": 0,
47
+ "nul_bytes_removed": 0,
48
+ "score_cast": "double -> int32",
49
+ "id_renamed": true,
50
+ "title_added": false,
51
+ "null_titles_filled": 0
52
+ },
53
+ "stats": {
54
+ "n_corpus": 3633,
55
+ "empty_docs": 0,
56
+ "corpus_with_title": 3633,
57
+ "avg_doc_chars": 1589.8,
58
+ "n_queries": 323,
59
+ "n_qrels": 12334,
60
+ "qrels_per_query": {
61
+ "min": 1,
62
+ "mean": 38.186,
63
+ "max": 475
64
+ },
65
+ "score_values": {
66
+ "1": 11758,
67
+ "2": 576
68
+ },
69
+ "dangling_qrels": 0,
70
+ "avg_query_chars": 21.8,
71
+ "duplicate_text_docs": 40
72
+ }
73
+ },
74
+ {
75
+ "subset": null,
76
+ "split": "train",
77
+ "source_configs": {
78
+ "queries": "queries/queries",
79
+ "corpus": "corpus/corpus",
80
+ "qrels": "default/train"
81
+ },
82
+ "normalize": {
83
+ "dropped_columns": {},
84
+ "orphan_queries_dropped": 647,
85
+ "duplicate_qrels_collapsed": 0,
86
+ "nul_bytes_removed": 0,
87
+ "score_cast": "double -> int32",
88
+ "id_renamed": true,
89
+ "title_added": false,
90
+ "null_titles_filled": 0
91
+ },
92
+ "stats": {
93
+ "n_corpus": 3633,
94
+ "empty_docs": 0,
95
+ "corpus_with_title": 3633,
96
+ "avg_doc_chars": 1589.8,
97
+ "n_queries": 2590,
98
+ "n_qrels": 110575,
99
+ "qrels_per_query": {
100
+ "min": 1,
101
+ "mean": 42.693,
102
+ "max": 1363
103
+ },
104
+ "score_values": {
105
+ "1": 110575
106
+ },
107
+ "dangling_qrels": 0,
108
+ "avg_query_chars": 21.9,
109
+ "duplicate_text_docs": 40
110
+ }
111
+ },
112
+ {
113
+ "subset": null,
114
+ "split": "dev",
115
+ "source_configs": {
116
+ "queries": "queries/queries",
117
+ "corpus": "corpus/corpus",
118
+ "qrels": "default/dev"
119
+ },
120
+ "normalize": {
121
+ "dropped_columns": {},
122
+ "orphan_queries_dropped": 2913,
123
+ "duplicate_qrels_collapsed": 0,
124
+ "nul_bytes_removed": 0,
125
+ "score_cast": "double -> int32",
126
+ "id_renamed": true,
127
+ "title_added": false,
128
+ "null_titles_filled": 0
129
+ },
130
+ "stats": {
131
+ "n_corpus": 3633,
132
+ "empty_docs": 0,
133
+ "corpus_with_title": 3633,
134
+ "avg_doc_chars": 1589.8,
135
+ "n_queries": 324,
136
+ "n_qrels": 11385,
137
+ "qrels_per_query": {
138
+ "min": 1,
139
+ "mean": 35.139,
140
+ "max": 919
141
+ },
142
+ "score_values": {
143
+ "1": 10864,
144
+ "2": 521
145
+ },
146
+ "dangling_qrels": 0,
147
+ "avg_query_chars": 22.3,
148
+ "duplicate_text_docs": 40
149
+ }
150
+ }
151
+ ],
152
+ "files": {
153
+ "corpus": {
154
+ "test": [
155
+ {
156
+ "path": "corpus/test-00000-of-00001.parquet",
157
+ "rows": 3633,
158
+ "bytes": 2159038,
159
+ "sha256": "456c749b15ca4c6baaba5d5e3499f62cc87db34707db786146fc092fbb465830"
160
+ }
161
+ ]
162
+ },
163
+ "queries": {
164
+ "test": [
165
+ {
166
+ "path": "queries/test-00000-of-00001.parquet",
167
+ "rows": 323,
168
+ "bytes": 6738,
169
+ "sha256": "138f4b2dd44362311fad6e2aa7911d1be64b91ee07457a3946241d9837575bd6"
170
+ }
171
+ ],
172
+ "train": [
173
+ {
174
+ "path": "queries/train-00000-of-00001.parquet",
175
+ "rows": 2590,
176
+ "bytes": 43656,
177
+ "sha256": "26f3560df603d38560ac850c4ca0e42b310ee7865fe23f934673ce2f7d2a4243"
178
+ }
179
+ ],
180
+ "dev": [
181
+ {
182
+ "path": "queries/dev-00000-of-00001.parquet",
183
+ "rows": 324,
184
+ "bytes": 6856,
185
+ "sha256": "5c045749115d6d3ffe3358f6588446deef58043b5bc3cab1df8e924d045c0398"
186
+ }
187
+ ]
188
+ },
189
+ "qrels": {
190
+ "test": [
191
+ {
192
+ "path": "qrels/test-00000-of-00001.parquet",
193
+ "rows": 12334,
194
+ "bytes": 21926,
195
+ "sha256": "67c3f007e34b7d1b211d8276f1c5292751d4dcbba7791f4b315a37b3b937e7af"
196
+ }
197
+ ],
198
+ "train": [
199
+ {
200
+ "path": "qrels/train-00000-of-00001.parquet",
201
+ "rows": 110575,
202
+ "bytes": 128581,
203
+ "sha256": "62a747f001310bd406d654f940e186a7c3e2a123d5014b66cc1b81949b0662b6"
204
+ }
205
+ ],
206
+ "dev": [
207
+ {
208
+ "path": "qrels/dev-00000-of-00001.parquet",
209
+ "rows": 11385,
210
+ "bytes": 21718,
211
+ "sha256": "f311f8a7a224b0e595c3c41c07a846485e2292d9dceb8b38f11d74c8214df2f4"
212
+ }
213
+ ]
214
+ }
215
+ },
216
+ "stats_total": {
217
+ "n_queries": 3237,
218
+ "n_corpus": 3633,
219
+ "n_qrels": 134294
220
+ },
221
+ "source_files": [
222
+ {
223
+ "path": ".gitattributes",
224
+ "size": 2406,
225
+ "sha256": null,
226
+ "blob_id": "80f8495df3315d75669d8adee26b2c0f409ed338"
227
+ },
228
+ {
229
+ "path": "README.md",
230
+ "size": 1459,
231
+ "sha256": null,
232
+ "blob_id": "de8ed014a0b21956abe2d7b673f7a558f8cbac97"
233
+ },
234
+ {
235
+ "path": "corpus.jsonl",
236
+ "size": 5969652,
237
+ "sha256": "ee3db77bc2183e66b9c114e6eca4adf44de381705b1f8c94de8efdd232f0c4ff",
238
+ "blob_id": "e182728022727291ff1743f59b372ac1c6efdd55"
239
+ },
240
+ {
241
+ "path": "qrels/dev.jsonl",
242
+ "size": 747747,
243
+ "sha256": null,
244
+ "blob_id": "c85fc9ed072525b801d0acdff49c5be7b3c2c17c"
245
+ },
246
+ {
247
+ "path": "qrels/dev.tsv",
248
+ "size": 258218,
249
+ "sha256": null,
250
+ "blob_id": "4c8b9ce3ecc4f26ea4a1d9a6c9e48a9adcc0458c"
251
+ },
252
+ {
253
+ "path": "qrels/test.jsonl",
254
+ "size": 809908,
255
+ "sha256": null,
256
+ "blob_id": "4a3ee3075ada5271b2c09c58b28f54341f20072c"
257
+ },
258
+ {
259
+ "path": "qrels/test.tsv",
260
+ "size": 279572,
261
+ "sha256": null,
262
+ "blob_id": "615081e6e8a76050060caf45d23fe68342d8d360"
263
+ },
264
+ {
265
+ "path": "qrels/train.jsonl",
266
+ "size": 7259342,
267
+ "sha256": null,
268
+ "blob_id": "a79d32ec90473b928109bee7bb48850eeba7da28"
269
+ },
270
+ {
271
+ "path": "qrels/train.tsv",
272
+ "size": 2504643,
273
+ "sha256": null,
274
+ "blob_id": "d61fa14bd70ce45480cf5a02a5d0021b78e2d610"
275
+ },
276
+ {
277
+ "path": "queries.jsonl",
278
+ "size": 180348,
279
+ "sha256": "1b893f53f3f62e8f2949a6db619a9cb058e8d97901a5010e108e60c4ef5fd924",
280
+ "blob_id": "569f21ea926daa15bd6b66d26f062dd8bee349b7"
281
+ }
282
+ ],
283
+ "build": {
284
+ "timestamp_utc": "2026-09-08T05:17:55Z",
285
+ "seconds": 10.1,
286
+ "peak_rss_gb": 0.27,
287
+ "python": "3.11.0",
288
+ "pyarrow": "25.0.1",
289
+ "datasets": "5.0.1",
290
+ "polars": "1.44.1"
291
+ },
292
+ "crosscheck": {
293
+ "legacy_repo": "Hyukkyu/beir-nfcorpus",
294
+ "legacy_qrels_repo": "Hyukkyu/beir-nfcorpus-qrels",
295
+ "corpus": {
296
+ "legacy_rows": 3633,
297
+ "build_rows": 3633,
298
+ "same_id_set": true
299
+ },
300
+ "qrels": {
301
+ "test": {
302
+ "legacy_split": "test",
303
+ "legacy_rows": 12334,
304
+ "build_rows": 12334,
305
+ "same_rows": true
306
+ },
307
+ "train": {
308
+ "legacy_split": "train",
309
+ "legacy_rows": 110575,
310
+ "build_rows": 110575,
311
+ "same_rows": true
312
+ },
313
+ "dev": {
314
+ "legacy_split": "dev",
315
+ "legacy_rows": 11385,
316
+ "build_rows": 11385,
317
+ "same_rows": true
318
+ }
319
+ },
320
+ "status": "match"
321
+ }
322
+ }
qrels/dev-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f311f8a7a224b0e595c3c41c07a846485e2292d9dceb8b38f11d74c8214df2f4
3
+ size 21718
qrels/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67c3f007e34b7d1b211d8276f1c5292751d4dcbba7791f4b315a37b3b937e7af
3
+ size 21926
{corpus → qrels}/train-00000-of-00001.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f4cb707cb7748795a2d64af8067fc04a9bb71bb0690bc82363c7c0793d9c0751
3
- size 3178637
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62a747f001310bd406d654f940e186a7c3e2a123d5014b66cc1b81949b0662b6
3
+ size 128581
queries/dev-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c045749115d6d3ffe3358f6588446deef58043b5bc3cab1df8e924d045c0398
3
+ size 6856
queries/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:138f4b2dd44362311fad6e2aa7911d1be64b91ee07457a3946241d9837575bd6
3
+ size 6738
queries/train-00000-of-00001.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1005e364488b00b2fec42d02c0fa1d283f0c0044b2d2ae061b16c8eab47a78a1
3
- size 80445
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26f3560df603d38560ac850c4ca0e42b310ee7865fe23f934673ce2f7d2a4243
3
+ size 43656