Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
question-generation
License:
Update process.py
Browse files- process.py +2 -2
process.py
CHANGED
@@ -7,7 +7,7 @@ from typing import Dict
|
|
7 |
from datasets import load_dataset
|
8 |
|
9 |
|
10 |
-
SEP_TOKEN = "
|
11 |
|
12 |
|
13 |
def create_data(hf_data):
|
@@ -19,7 +19,7 @@ def create_data(hf_data):
|
|
19 |
'questions': [_g.replace(SEP_TOKEN, " ") for _g in g['question']],
|
20 |
'answers': [_g.replace(SEP_TOKEN, " ") for _g in g['answer']],
|
21 |
}
|
22 |
-
example["questions_answers"] = SEP_TOKEN.join([f"
|
23 |
output.append(example)
|
24 |
return output
|
25 |
|
|
|
7 |
from datasets import load_dataset
|
8 |
|
9 |
|
10 |
+
SEP_TOKEN = " | "
|
11 |
|
12 |
|
13 |
def create_data(hf_data):
|
|
|
19 |
'questions': [_g.replace(SEP_TOKEN, " ") for _g in g['question']],
|
20 |
'answers': [_g.replace(SEP_TOKEN, " ") for _g in g['answer']],
|
21 |
}
|
22 |
+
example["questions_answers"] = SEP_TOKEN.join([f"question: {q}, answer: {a}" for q, a in zip(example["questions"], example["answers"])])
|
23 |
output.append(example)
|
24 |
return output
|
25 |
|