Datasets:
Tasks:
Question Answering
Sub-tasks:
extractive-qa
Languages:
English
Size:
1M<n<10M
ArXiv:
License:
Update lotte_passages.py
Browse files- lotte_passages.py +44 -34
lotte_passages.py
CHANGED
@@ -172,46 +172,56 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
172 |
|
173 |
data = json.loads(row)
|
174 |
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
if len(data) == 268880 or len(data) == 119458:
|
179 |
-
current_index = i + 1
|
180 |
-
|
181 |
-
if first_row and (len(data) == 268880 or len(data) == 119458):
|
182 |
-
|
183 |
-
if len(data) == 268880: #lifestyle dev
|
184 |
-
current_query = {"doc_id": 0, "author": "Julie Baumler", "text": "In my experience rabbits are very easy to housebreak. They like to pee and poop in the same place every time, so in most cases all you have to do is put a little bit of their waste in the litter box and they will happily use the litter box. It is very important that if they go somewhere else, miss the edge or kick waste out of the box that you clean it up well and immediately as otherwise those spots will become existing places to pee and poop. When you clean the box, save a little bit of waste and put it in the cleaned box so it smells right to them. For a more foolproof method, you can get a piece of wood soaked with their urine and put that in the box along with droppings or cage them so that they are only in their litter box for a week. Generally, if I try the first method and find that they are not using only the box on the first day, I go for the litter box only for a week method. The wood block works well if you are moving from a hutch outdoors to a litter box indoors. If you have an indoor cage, you can use the cage itself as the litter box (or attach a litter box to the section of the cage the rabbit has used for waste.) Be sure to use clay or newsprint litter as the other types aren't necessarily good for rabbits. Wood litter is okay if you are sure it isn't fir. The most important thing is to clean anywhere they have an accident. High sided boxes help with avoiding kicking soiled litter out of the box, which is the biggest cause of failure in my experience."}
|
185 |
-
elif len(data) == 119458: #lifestyle test
|
186 |
-
current_query = {"doc_id": 0, "author": "forefinger", "text": "Normal double-acting baking powder makes CO2 (thus giving a rising effect) in two ways: when it gets wet, and when it is heated. Baking soda only makes CO2 when it gets wet. From Wikipedia: The acid in a baking powder can be either fast-acting or slow-acting.[6] A fast-acting acid reacts in a wet mixture with baking soda at room temperature, and a slow-acting acid will not react until heated in an oven. Baking powders that contain both fast- and slow-acting acids are double acting; those that contain only one acid are single acting. By providing a second rise in the oven, double-acting baking powders increase the reliability of baked goods by rendering the time elapsed between mixing and baking less critical, and this is the type most widely available to consumers today."}
|
187 |
-
|
188 |
-
if "author" in current_query.keys():
|
189 |
-
author = current_query['author']
|
190 |
-
else:
|
191 |
-
author = ""
|
192 |
|
193 |
-
yield current_index, {
|
194 |
-
"doc_id": current_query["doc_id"],
|
195 |
-
"author": author,
|
196 |
-
"text": current_query["text"]
|
197 |
-
}
|
198 |
-
|
199 |
-
first_row = False
|
200 |
-
|
201 |
-
########################################################
|
202 |
-
|
203 |
-
if len(data) == 268880 or len(data) == 119458:
|
204 |
-
current_query = data[i]
|
205 |
-
else:
|
206 |
-
current_query = data
|
207 |
-
|
208 |
if "author" in current_query.keys():
|
209 |
author = current_query['author']
|
210 |
else:
|
211 |
author = ""
|
212 |
-
|
213 |
-
yield
|
214 |
"doc_id": current_query["doc_id"],
|
215 |
"author": author,
|
216 |
"text": current_query["text"]
|
217 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
data = json.loads(row)
|
174 |
|
175 |
+
if len(data) == 3:
|
176 |
+
|
177 |
+
current_query = data#[i]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
if "author" in current_query.keys():
|
180 |
author = current_query['author']
|
181 |
else:
|
182 |
author = ""
|
183 |
+
|
184 |
+
yield current_query["doc_id"], {
|
185 |
"doc_id": current_query["doc_id"],
|
186 |
"author": author,
|
187 |
"text": current_query["text"]
|
188 |
}
|
189 |
+
|
190 |
+
else:
|
191 |
+
|
192 |
+
for i in range(0, len(data)):
|
193 |
+
|
194 |
+
assert len(data) == 268880 or len(data) == 119458 #lifestyle bug
|
195 |
+
|
196 |
+
if len(data) == 268880 or len(data) == 119458:
|
197 |
+
|
198 |
+
if len(data) == 268880:
|
199 |
+
current_query = {"doc_id": 0, "author": "Julie Baumler", "text": "In my experience rabbits are very easy to housebreak. They like to pee and poop in the same place every time, so in most cases all you have to do is put a little bit of their waste in the litter box and they will happily use the litter box. It is very important that if they go somewhere else, miss the edge or kick waste out of the box that you clean it up well and immediately as otherwise those spots will become existing places to pee and poop. When you clean the box, save a little bit of waste and put it in the cleaned box so it smells right to them. For a more foolproof method, you can get a piece of wood soaked with their urine and put that in the box along with droppings or cage them so that they are only in their litter box for a week. Generally, if I try the first method and find that they are not using only the box on the first day, I go for the litter box only for a week method. The wood block works well if you are moving from a hutch outdoors to a litter box indoors. If you have an indoor cage, you can use the cage itself as the litter box (or attach a litter box to the section of the cage the rabbit has used for waste.) Be sure to use clay or newsprint litter as the other types aren't necessarily good for rabbits. Wood litter is okay if you are sure it isn't fir. The most important thing is to clean anywhere they have an accident. High sided boxes help with avoiding kicking soiled litter out of the box, which is the biggest cause of failure in my experience."}
|
200 |
+
elif len(data) == 119458:
|
201 |
+
current_query = {"doc_id": 0, "author": "forefinger", "text": "Normal double-acting baking powder makes CO2 (thus giving a rising effect) in two ways: when it gets wet, and when it is heated. Baking soda only makes CO2 when it gets wet. From Wikipedia: The acid in a baking powder can be either fast-acting or slow-acting.[6] A fast-acting acid reacts in a wet mixture with baking soda at room temperature, and a slow-acting acid will not react until heated in an oven. Baking powders that contain both fast- and slow-acting acids are double acting; those that contain only one acid are single acting. By providing a second rise in the oven, double-acting baking powders increase the reliability of baked goods by rendering the time elapsed between mixing and baking less critical, and this is the type most widely available to consumers today."}
|
202 |
+
|
203 |
+
if first_row:
|
204 |
+
if "author" in current_query.keys():
|
205 |
+
author = current_query['author']
|
206 |
+
else:
|
207 |
+
author = ""
|
208 |
+
|
209 |
+
yield current_index, {
|
210 |
+
"doc_id": current_query["doc_id"],
|
211 |
+
"author": author,
|
212 |
+
"text": current_query["text"]
|
213 |
+
}
|
214 |
+
first_row = False
|
215 |
+
|
216 |
+
current_query = data[i]
|
217 |
+
|
218 |
+
if "author" in current_query.keys():
|
219 |
+
author = current_query['author']
|
220 |
+
else:
|
221 |
+
author = ""
|
222 |
+
|
223 |
+
yield current_index, {
|
224 |
+
"doc_id": current_query["doc_id"],
|
225 |
+
"author": author,
|
226 |
+
"text": current_query["text"]
|
227 |
+
}
|