pietrolesci commited on
Commit
6c9d73b
1 Parent(s): 5a05862

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -3
README.md CHANGED
@@ -35,11 +35,15 @@ for split, path in paths.items():
35
  # encode labels using the default mapping used by other nli datasets
36
  # i.e, entailment: 0, neutral: 1, contradiction: 2
37
  df.columns = df.columns.str.lower()
38
- if not "test" in path:
39
- df["label"] = df["label"].map({"entailment": 0, "neutral": 1, "contradiction": 2})
40
 
41
- else:
42
  df["label"] = -1
 
 
 
 
 
 
43
 
44
  # cast to dataset
45
  features = Features({
35
  # encode labels using the default mapping used by other nli datasets
36
  # i.e, entailment: 0, neutral: 1, contradiction: 2
37
  df.columns = df.columns.str.lower()
 
 
38
 
39
+ if "test" in path:
40
  df["label"] = -1
41
+
42
+ else:
43
+ # remove empty labels
44
+ df = df.loc[~df["label"].isna()]
45
+ # encode labels
46
+ df["label"] = df["label"].map({"entailment": 0, "neutral": 1, "contradiction": 2})
47
 
48
  # cast to dataset
49
  features = Features({