hpprc commited on
Commit
fd87848
1 Parent(s): a5902de

update config

Browse files
Files changed (1) hide show
  1. jsick.py +22 -1
jsick.py CHANGED
@@ -50,6 +50,11 @@ class JSICKDataset(ds.GeneratorBasedBuilder):
50
  version=VERSION,
51
  description="fuga",
52
  ),
 
 
 
 
 
53
  ]
54
 
55
  def _info(self) -> ds.DatasetInfo:
@@ -96,6 +101,22 @@ class JSICKDataset(ds.GeneratorBasedBuilder):
96
  )
97
 
98
  elif self.config.name == "stress":
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  features = ds.Features(
100
  {
101
  "pair_ID": ds.Value("string"),
@@ -123,7 +144,7 @@ class JSICKDataset(ds.GeneratorBasedBuilder):
123
  data_path = dl_manager.download_and_extract(_URLS[self.config.name])
124
  df: pd.DataFrame = pd.read_table(data_path, sep="\t", header=0)
125
 
126
- if self.config.name == "base":
127
  df = df.rename(
128
  columns={
129
  "pair_ID": "id",
 
50
  version=VERSION,
51
  description="fuga",
52
  ),
53
+ ds.BuilderConfig(
54
+ name="stress_original",
55
+ version=VERSION,
56
+ description="fuga",
57
+ ),
58
  ]
59
 
60
  def _info(self) -> ds.DatasetInfo:
 
101
  )
102
 
103
  elif self.config.name == "stress":
104
+ features = ds.Features(
105
+ {
106
+ "id": ds.Value("string"),
107
+ "premise": ds.Value("string"),
108
+ "hypothesis": ds.Value("string"),
109
+ "label": labels,
110
+ "score": ds.Value("float32"),
111
+ "sentence_A_Ja_origin": ds.Value("string"),
112
+ "entailment_label_origin": labels,
113
+ "relatedness_score_Ja_origin": ds.Value("float32"),
114
+ "rephrase_type": ds.Value("string"),
115
+ "case_particles": ds.Value("string"),
116
+ }
117
+ )
118
+
119
+ elif self.config.name == "stress_original":
120
  features = ds.Features(
121
  {
122
  "pair_ID": ds.Value("string"),
 
144
  data_path = dl_manager.download_and_extract(_URLS[self.config.name])
145
  df: pd.DataFrame = pd.read_table(data_path, sep="\t", header=0)
146
 
147
+ if self.config.name in ["base", "stress"]:
148
  df = df.rename(
149
  columns={
150
  "pair_ID": "id",