spacemanidol commited on
Commit
d7e9ec5
·
1 Parent(s): c26509b

working for a birkin

Browse files
.gitattributes CHANGED
@@ -39,3 +39,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
39
  *.mp3 filter=lfs diff=lfs merge=lfs -text
40
  *.ogg filter=lfs diff=lfs merge=lfs -text
41
  *.wav filter=lfs diff=lfs merge=lfs -text
 
 
39
  *.mp3 filter=lfs diff=lfs merge=lfs -text
40
  *.ogg filter=lfs diff=lfs merge=lfs -text
41
  *.wav filter=lfs diff=lfs merge=lfs -text
42
+ collection.jsonl filter=lfs diff=lfs merge=lfs -text
ESCI-product-dataset-corpus-jp.py ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Improving Product Search dataset - JP."""
18
+
19
+ import json
20
+
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
27
+ and Arnab Biswas and Anlu Xing and Karthik Subbian},
28
+ year={2022},
29
+ eprint={2206.06588},
30
+ archivePrefix={arXiv}
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = "dataset load script for Improve Product Search Japanese Dataset"
35
+
36
+ _DATASET_URLS = {
37
+ 'train': "https://huggingface.co/datasets/spacemanidol/ESCI-product-dataset-corpus-jp/resolve/main/collection.jsonl"
38
+ }
39
+
40
+
41
+ class ProductSearchJapaneseCorpus(datasets.GeneratorBasedBuilder):
42
+ VERSION = datasets.Version("0.0.1")
43
+
44
+ BUILDER_CONFIGS = [
45
+ datasets.BuilderConfig(version=VERSION,
46
+ description="Product Search Japanese Dataset 100-word splits"),
47
+ ]
48
+ def _info(self):
49
+ features = datasets.Features(
50
+ {'docid': datasets.Value('string'), 'text': datasets.Value('string'),
51
+ 'title': datasets.Value('string'), 'bullet_points': datasets.Value('string'),
52
+ 'brand': datasets.Value('string'), 'color': datasets.Value('string'),
53
+ 'locale': datasets.Value('string')
54
+ },
55
+ )
56
+ return datasets.DatasetInfo(
57
+ # This is the description that will appear on the datasets page.
58
+ description=_DESCRIPTION,
59
+ # This defines the different columns of the dataset and their types
60
+ features=features, # Here we define them above because they are different between the two configurations
61
+ supervised_keys=None,
62
+ # Homepage of the dataset for documentation
63
+ homepage="",
64
+ # License for the dataset if available
65
+ license="",
66
+ # Citation for the dataset
67
+ citation=_CITATION,
68
+ )
69
+
70
+ def _split_generators(self, dl_manager):
71
+ downloaded_files = dl_manager.download_and_extract(_DATASET_URLS)
72
+ splits = [
73
+ datasets.SplitGenerator(
74
+ name="train",
75
+ gen_kwargs={
76
+ "filepath": downloaded_files["train"],
77
+ },
78
+ ),
79
+ ]
80
+ return splits
81
+
82
+ def _generate_examples(self, filepath):
83
+ """Yields examples."""
84
+ with open(filepath, encoding="utf-8") as f:
85
+ for line in f:
86
+ data = json.loads(line)
87
+ yield data['docid'], data
collection.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78f7532630cfa31ed0ac3d299c46c0d90d32a339879c537654e5aa98caa480f2
3
+ size 713729925