spacemanidol
commited on
Commit
•
e5be61b
1
Parent(s):
b4dc319
python file
Browse files- ESCI-product-dataset.py +30 -10
ESCI-product-dataset.py
CHANGED
@@ -21,6 +21,15 @@ import json
|
|
21 |
import datasets
|
22 |
|
23 |
_CITATION = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
}
|
26 |
"""
|
@@ -47,36 +56,47 @@ class ESCIproduct(datasets.GeneratorBasedBuilder):
|
|
47 |
'query_id': datasets.Value('string'),
|
48 |
'query': datasets.Value('string'),
|
49 |
'positive_passages': [
|
50 |
-
{'
|
51 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
52 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
53 |
-
'
|
54 |
],
|
55 |
'positive_passages_substitue': [
|
56 |
-
|
57 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
58 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
59 |
-
'
|
|
|
60 |
],
|
61 |
'negative_passages': [
|
62 |
-
{'
|
63 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
64 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
65 |
-
'
|
66 |
],
|
67 |
'negative_passages_true': [
|
68 |
-
{'
|
69 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
70 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
71 |
-
'
|
72 |
],
|
73 |
'negative_passages_complement': [
|
74 |
-
{'
|
75 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
76 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
77 |
-
'
|
78 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
})
|
|
|
80 |
return datasets.DatasetInfo(
|
81 |
# This is the description that will appear on the datasets page.
|
82 |
description=_DESCRIPTION,
|
|
|
21 |
import datasets
|
22 |
|
23 |
_CITATION = """
|
24 |
+
@misc{reddy2022shopping,
|
25 |
+
title={Shopping Queries Dataset: A Large-Scale {ESCI} Benchmark for Improving Product Search},
|
26 |
+
author={Chandan K. Reddy and Lluís Màrquez and Fran Valero and Nikhil Rao and Hugo Zaragoza and Sambaran Bandyopadhyay and
|
27 |
+
Arnab Biswas and Anlu Xing and Karthik Subbian},
|
28 |
+
year={2022},
|
29 |
+
eprint={2206.06588},
|
30 |
+
archivePrefix={arXiv}
|
31 |
+
}
|
32 |
+
|
33 |
|
34 |
}
|
35 |
"""
|
|
|
56 |
'query_id': datasets.Value('string'),
|
57 |
'query': datasets.Value('string'),
|
58 |
'positive_passages': [
|
59 |
+
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
60 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
61 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
62 |
+
'brand': datasets.Value('string'),'contents': datasets.Value('string')}
|
63 |
],
|
64 |
'positive_passages_substitue': [
|
65 |
+
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
66 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
67 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
68 |
+
'brand': datasets.Value('string'),'contents': datasets.Value('string')}
|
69 |
+
|
70 |
],
|
71 |
'negative_passages': [
|
72 |
+
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
73 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
74 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
75 |
+
'brand': datasets.Value('string'),'contents': datasets.Value('string')}
|
76 |
],
|
77 |
'negative_passages_true': [
|
78 |
+
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
79 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
80 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
81 |
+
'brand': datasets.Value('string'),'contents': datasets.Value('string')}
|
82 |
],
|
83 |
'negative_passages_complement': [
|
84 |
+
{'docid': datasets.Value('string'), 'text': datasets.Value('string'),
|
85 |
'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
|
86 |
'color': datasets.Value('string'), 'locale': datasets.Value('string'),
|
87 |
+
'brand': datasets.Value('string'),'contents': datasets.Value('string')}
|
88 |
],
|
89 |
+
'query-inject-det': datasets.Value('string'),
|
90 |
+
'query-stem': datasets.Value('string'),
|
91 |
+
'query-synonym': datasets.Value('string'),
|
92 |
+
'query-random-char-swap': datasets.Value('string'),
|
93 |
+
'query-char-keyboard': datasets.Value('string'),
|
94 |
+
'query-paraphrase': datasets.Value('string'),
|
95 |
+
'query-reorder-words': datasets.Value('string'),
|
96 |
+
'query-backtranslation': datasets.Value('string'),
|
97 |
+
'query-char-delete': datasets.Value('string')
|
98 |
})
|
99 |
+
|
100 |
return datasets.DatasetInfo(
|
101 |
# This is the description that will appear on the datasets page.
|
102 |
description=_DESCRIPTION,
|