julianrisch
commited on
Commit
·
0113ca5
1
Parent(s):
157a5d5
Update germandpr.py
Browse files- germandpr.py +4 -4
germandpr.py
CHANGED
@@ -11,7 +11,7 @@ import datasets
|
|
11 |
logger = datasets.logging.get_logger(__name__)
|
12 |
|
13 |
|
14 |
-
_CITATION = """
|
15 |
@misc{möller2021germanquad,
|
16 |
title={GermanQuAD and GermanDPR: Improving Non-English Question Answering and Passage Retrieval},
|
17 |
author={Timo Möller and Julian Risch and Malte Pietsch},
|
@@ -22,7 +22,7 @@ _CITATION = """\\\\
|
|
22 |
}
|
23 |
"""
|
24 |
|
25 |
-
_DESCRIPTION = """
|
26 |
We take GermanQuAD as a starting point and add hard negatives from a dump of the full German Wikipedia following the approach of the DPR authors (Karpukhin et al., 2020). The format of the dataset also resembles the one of DPR. GermanDPR comprises 9275 question/answer pairs in the training set and 1025 pairs in the test set. For each pair, there are one positive context and three hard negative contexts.
|
27 |
"""
|
28 |
|
@@ -109,5 +109,5 @@ class GermanDPR(datasets.GeneratorBasedBuilder):
|
|
109 |
logger.info("generating examples from = %s", filepath)
|
110 |
with open(filepath, encoding="utf-8") as f:
|
111 |
germandpr = json.load(f)
|
112 |
-
for qa in germandpr:
|
113 |
-
yield qa
|
|
|
11 |
logger = datasets.logging.get_logger(__name__)
|
12 |
|
13 |
|
14 |
+
_CITATION = """
|
15 |
@misc{möller2021germanquad,
|
16 |
title={GermanQuAD and GermanDPR: Improving Non-English Question Answering and Passage Retrieval},
|
17 |
author={Timo Möller and Julian Risch and Malte Pietsch},
|
|
|
22 |
}
|
23 |
"""
|
24 |
|
25 |
+
_DESCRIPTION = """
|
26 |
We take GermanQuAD as a starting point and add hard negatives from a dump of the full German Wikipedia following the approach of the DPR authors (Karpukhin et al., 2020). The format of the dataset also resembles the one of DPR. GermanDPR comprises 9275 question/answer pairs in the training set and 1025 pairs in the test set. For each pair, there are one positive context and three hard negative contexts.
|
27 |
"""
|
28 |
|
|
|
109 |
logger.info("generating examples from = %s", filepath)
|
110 |
with open(filepath, encoding="utf-8") as f:
|
111 |
germandpr = json.load(f)
|
112 |
+
for id, qa in enumerate(germandpr):
|
113 |
+
yield id, qa
|