siyue commited on
Commit
ca87119
1 Parent(s): 6b6a820
Files changed (1) hide show
  1. squall.py +8 -18
squall.py CHANGED
@@ -57,35 +57,25 @@ _URLS = {
57
  class SquallConfig(datasets.BuilderConfig):
58
  """BuilderConfig for Squall."""
59
 
60
- def __init__(self, fold_num, **kwargs):
61
  """BuilderConfig for Squall.
62
 
63
  Args:
64
  **kwargs: keyword arguments forwarded to super.
65
  """
66
  super(SquallConfig, self).__init__(**kwargs)
67
- self.fold_num = fold_num
68
 
69
 
70
  class Squall(datasets.GeneratorBasedBuilder):
71
  """SQUALL: Lexical-level Supervised Table Question Answering Dataset."""
72
 
73
  BUILDER_CONFIGS = [
74
- SquallConfig(
75
- fold_num=0,
76
- ),
77
- SquallConfig(
78
- fold_num=1,
79
- ),
80
- SquallConfig(
81
- fold_num=2,
82
- ),
83
- SquallConfig(
84
- fold_num=3,
85
- ),
86
- SquallConfig(
87
- fold_num=4,
88
- ),
89
  ]
90
 
91
  def _info(self):
@@ -146,7 +136,7 @@ class Squall(datasets.GeneratorBasedBuilder):
146
  logger.info("generating examples from = %s", filepath)
147
 
148
  squall_full = filepath["squall"] + '/squall.json'
149
- dev_ids = filepath[f"dev-{self.fold_num}"] + f"/dev-{self.fold_num}.ids"
150
  test = filepath["twtq-test"] + "/twtq-test.json"
151
 
152
  if split_key != 'test':
 
57
  class SquallConfig(datasets.BuilderConfig):
58
  """BuilderConfig for Squall."""
59
 
60
+ def __init__(self, **kwargs):
61
  """BuilderConfig for Squall.
62
 
63
  Args:
64
  **kwargs: keyword arguments forwarded to super.
65
  """
66
  super(SquallConfig, self).__init__(**kwargs)
 
67
 
68
 
69
  class Squall(datasets.GeneratorBasedBuilder):
70
  """SQUALL: Lexical-level Supervised Table Question Answering Dataset."""
71
 
72
  BUILDER_CONFIGS = [
73
+ SquallConfig(name = '0'),
74
+ SquallConfig(name = '1'),
75
+ SquallConfig(name = '2'),
76
+ SquallConfig(name = '3'),
77
+ SquallConfig(name = '4')
78
+
 
 
 
 
 
 
 
 
 
79
  ]
80
 
81
  def _info(self):
 
136
  logger.info("generating examples from = %s", filepath)
137
 
138
  squall_full = filepath["squall"] + '/squall.json'
139
+ dev_ids = filepath["dev-" + self.name] + "/dev-" + self.name + ".ids"
140
  test = filepath["twtq-test"] + "/twtq-test.json"
141
 
142
  if split_key != 'test':