joelniklaus commited on
Commit
38b21bf
1 Parent(s): 5fbc120

fixed problem in loading script

Browse files
Files changed (1) hide show
  1. legal-mc4.py +2 -3
legal-mc4.py CHANGED
@@ -75,7 +75,6 @@ class MC4Legal(datasets.GeneratorBasedBuilder):
75
  description=_DESCRIPTION,
76
  features=datasets.Features(
77
  {
78
- "index": datasets.Value("int32"),
79
  "url": datasets.Value("string"),
80
  "timestamp": datasets.Value("timestamp[s]"),
81
  "matches": datasets.Sequence(datasets.Value("string")),
@@ -121,11 +120,11 @@ class MC4Legal(datasets.GeneratorBasedBuilder):
121
  # remove the Z at the end (time zone)
122
  if isinstance(timestamp, str) and timestamp.endswith("Z"):
123
  timestamp = timestamp[:-1]
 
124
  yield id_, {
125
- "index": example.get("index", ""),
126
  "url": example.get("url", ""),
127
  "timestamp": timestamp,
128
- "matches": ast.literal_eval(example.get("matches", "")),
129
  "text": example.get("text", ""),
130
  }
131
  id_ += 1
 
75
  description=_DESCRIPTION,
76
  features=datasets.Features(
77
  {
 
78
  "url": datasets.Value("string"),
79
  "timestamp": datasets.Value("timestamp[s]"),
80
  "matches": datasets.Sequence(datasets.Value("string")),
 
120
  # remove the Z at the end (time zone)
121
  if isinstance(timestamp, str) and timestamp.endswith("Z"):
122
  timestamp = timestamp[:-1]
123
+ print(example)
124
  yield id_, {
 
125
  "url": example.get("url", ""),
126
  "timestamp": timestamp,
127
+ "matches": example.get("matches", []),
128
  "text": example.get("text", ""),
129
  }
130
  id_ += 1