khalidalt commited on
Commit
9a2edc6
1 Parent(s): 9a1a7db

Update tydiqa-goldp.py

Browse files
Files changed (1) hide show
  1. tydiqa-goldp.py +28 -7
tydiqa-goldp.py CHANGED
@@ -36,15 +36,36 @@ _VERSION = datasets.Version("1.1.0", "")
36
 
37
  class tydiqa_GoldP(datasets.GeneratorBasedBuilder):
38
  BUILDER_CONFIGS = [
39
- datasets.BuilderConfig(
40
- name=lang,
41
- description=f"tydiqa-GoldP language {lang}",
42
- version=_VERSION,
43
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  for lang in _LANG
45
  ]
46
-
47
-
48
  def _info(self):
49
  # TODO(tydiqa): Specifies the datasets.DatasetInfo object
50
 
 
36
 
37
  class tydiqa_GoldP(datasets.GeneratorBasedBuilder):
38
  BUILDER_CONFIGS = [
39
+ TydiqaConfig(
40
+ name="primary_task",
41
+ description=textwrap.dedent(
42
+ """\
43
+ Passage selection task (SelectP): Given a list of the passages in the article, return either (a) the index of
44
+ the passage that answers the question or (b) NULL if no such passage exists.
45
+ Minimal answer span task (MinSpan): Given the full text of an article, return one of (a) the start and end
46
+ byte indices of the minimal span that completely answers the question; (b) YES or NO if the question requires
47
+ a yes/no answer and we can draw a conclusion from the passage; (c) NULL if it is not possible to produce a
48
+ minimal answer for this question."""
49
+ ),
50
+ ),
51
+ TydiqaConfig(
52
+ name="secondary_task",
53
+ description=textwrap.dedent(
54
+ """Gold passage task (GoldP): Given a passage that is guaranteed to contain the
55
+ answer, predict the single contiguous span of characters that answers the question. This is more similar to
56
+ existing reading comprehension datasets (as opposed to the information-seeking task outlined above).
57
+ This task is constructed with two goals in mind: (1) more directly comparing with prior work and (2) providing
58
+ a simplified way for researchers to use TyDi QA by providing compatibility with existing code for SQuAD 1.1,
59
+ XQuAD, and MLQA. Toward these goals, the gold passage task differs from the primary task in several ways:
60
+ only the gold answer passage is provided rather than the entire Wikipedia article;
61
+ unanswerable questions have been discarded, similar to MLQA and XQuAD;
62
+ we evaluate with the SQuAD 1.1 metrics like XQuAD; and
63
+ Thai and Japanese are removed since the lack of whitespace breaks some tools.
64
+ """
65
+ ),
66
+ ),
67
  for lang in _LANG
68
  ]
 
 
69
  def _info(self):
70
  # TODO(tydiqa): Specifies the datasets.DatasetInfo object
71