PiC commited on
Commit
44ed974
1 Parent(s): 05a810c

Update phrase_retrieval.py

Browse files
Files changed (1) hide show
  1. phrase_retrieval.py +5 -5
phrase_retrieval.py CHANGED
@@ -50,7 +50,7 @@ _PR_PASS = "PR-pass"
50
  _PR_PAGE = "PR-page"
51
 
52
 
53
- class PiCConfig(datasets.BuilderConfig):
54
  """BuilderConfig for Phrase Retrieval in PiC."""
55
 
56
  def __init__(self, **kwargs):
@@ -58,18 +58,18 @@ class PiCConfig(datasets.BuilderConfig):
58
  Args:
59
  **kwargs: keyword arguments forwarded to super.
60
  """
61
- super(PiCConfig, self).__init__(**kwargs)
62
 
63
 
64
  class PhraseRetrieval(datasets.GeneratorBasedBuilder):
65
  """Phrase Retrieval in PiC dataset. Version 1.0."""
66
 
67
- BUILDER_CONFIGS = [PiCConfig(
68
  name=_PR_PASS,
69
  version=datasets.Version("1.0.0"),
70
  description="The PiC Dataset for Phrase Retrieval at short passage level (~11 sentences)"
71
  ),
72
- PiCConfig(
73
  name=_PR_PAGE,
74
  version=datasets.Version("1.0.0"),
75
  description="The PiC Dataset for Phrase Retrieval at Wiki page level"
@@ -85,7 +85,7 @@ class PhraseRetrieval(datasets.GeneratorBasedBuilder):
85
  "title": datasets.Value("string"),
86
  "context": datasets.Value("string"),
87
  "question": datasets.Value("string"),
88
- "answers": datasets.features.Sequence(
89
  {
90
  "text": datasets.Sequence(datasets.Value("string")),
91
  "answer_start": datasets.Sequence(datasets.Value("int32")),
 
50
  _PR_PAGE = "PR-page"
51
 
52
 
53
+ class PRConfig(datasets.BuilderConfig):
54
  """BuilderConfig for Phrase Retrieval in PiC."""
55
 
56
  def __init__(self, **kwargs):
 
58
  Args:
59
  **kwargs: keyword arguments forwarded to super.
60
  """
61
+ super(PRConfig, self).__init__(**kwargs)
62
 
63
 
64
  class PhraseRetrieval(datasets.GeneratorBasedBuilder):
65
  """Phrase Retrieval in PiC dataset. Version 1.0."""
66
 
67
+ BUILDER_CONFIGS = [PRConfig(
68
  name=_PR_PASS,
69
  version=datasets.Version("1.0.0"),
70
  description="The PiC Dataset for Phrase Retrieval at short passage level (~11 sentences)"
71
  ),
72
+ PRConfig(
73
  name=_PR_PAGE,
74
  version=datasets.Version("1.0.0"),
75
  description="The PiC Dataset for Phrase Retrieval at Wiki page level"
 
85
  "title": datasets.Value("string"),
86
  "context": datasets.Value("string"),
87
  "question": datasets.Value("string"),
88
+ "answers": datasets.features.Dict(
89
  {
90
  "text": datasets.Sequence(datasets.Value("string")),
91
  "answer_start": datasets.Sequence(datasets.Value("int32")),