system HF staff commited on
Commit
7bd4d2b
1 Parent(s): 50340b1

Update files from the datasets library (from 1.6.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.6.0

Files changed (1) hide show
  1. xnli.py +2 -2
xnli.py CHANGED
@@ -16,7 +16,6 @@
16
  # Lint as: python3
17
  """XNLI: The Cross-Lingual NLI Corpus."""
18
 
19
- from __future__ import absolute_import, division, print_function
20
 
21
  import collections
22
  import csv
@@ -194,7 +193,8 @@ class Xnli(datasets.GeneratorBasedBuilder):
194
  file = open(filepath, encoding="utf-8")
195
  reader = csv.DictReader(file, delimiter="\t", quoting=csv.QUOTE_NONE)
196
  for row_idx, row in enumerate(reader):
197
- yield (file_idx, row_idx), {
 
198
  "premise": row["premise"],
199
  "hypothesis": row["hypo"],
200
  "label": row["label"].replace("contradictory", "contradiction"),
 
16
  # Lint as: python3
17
  """XNLI: The Cross-Lingual NLI Corpus."""
18
 
 
19
 
20
  import collections
21
  import csv
 
193
  file = open(filepath, encoding="utf-8")
194
  reader = csv.DictReader(file, delimiter="\t", quoting=csv.QUOTE_NONE)
195
  for row_idx, row in enumerate(reader):
196
+ key = str(file_idx) + "_" + str(row_idx)
197
+ yield key, {
198
  "premise": row["premise"],
199
  "hypothesis": row["hypo"],
200
  "label": row["label"].replace("contradictory", "contradiction"),