Ignore codec errors
Browse files- the_pile.py +1 -1
the_pile.py
CHANGED
|
@@ -237,7 +237,7 @@ class ThePile(datasets.GeneratorBasedBuilder):
|
|
| 237 |
else:
|
| 238 |
id_ = path.split("/")[-1].split(".")[0]
|
| 239 |
meta = {"id": id_}
|
| 240 |
-
text = file.read().decode("utf-8")
|
| 241 |
yield key, {
|
| 242 |
"text": text,
|
| 243 |
"meta": meta,
|
|
|
|
| 237 |
else:
|
| 238 |
id_ = path.split("/")[-1].split(".")[0]
|
| 239 |
meta = {"id": id_}
|
| 240 |
+
text = file.read().decode("utf-8", errors="ignore") # encoding errors in enron_emails
|
| 241 |
yield key, {
|
| 242 |
"text": text,
|
| 243 |
"meta": meta,
|