Datasets:

Tasks:
Other
Modalities:
Text
ArXiv:
Libraries:
Datasets
License:
juletxara commited on
Commit
dc85242
·
1 Parent(s): 4c5f64c

fix script right and wrong answer

Browse files
Files changed (1) hide show
  1. xstory_cloze.py +2 -2
xstory_cloze.py CHANGED
@@ -121,8 +121,8 @@ class XStoryCloze(datasets.GeneratorBasedBuilder):
121
  _ = next(csv_reader)
122
  for id_, row in enumerate(csv_reader):
123
  if row and len(row) == 8:
124
- text_right = row[5] if row[7] == 1 else row[6]
125
- text_wrong = row[6] if row[7] == 1 else row[5]
126
  yield id_, {
127
  "story_id": row[0],
128
  "input_sentence_1": row[1],
 
121
  _ = next(csv_reader)
122
  for id_, row in enumerate(csv_reader):
123
  if row and len(row) == 8:
124
+ text_right = row[5] if int(row[7]) == 1 else row[6]
125
+ text_wrong = row[6] if int(row[7]) == 1 else row[5]
126
  yield id_, {
127
  "story_id": row[0],
128
  "input_sentence_1": row[1],