Datasets:
Languages:
English
Multilinguality:
monolingual
Size Categories:
n<1K
Language Creators:
expert-generated
Annotations Creators:
no-annotation
Source Datasets:
original
License:
Commit
•
0feb235
1
Parent(s):
dc4e487
open files with latin-1 encoding
Browse filesI only checked one example, but I think these files are all probably encoded as `latin-1`:
```xml
<?xml version="1.0" encoding="ISO-8859-1"?>
```
- lancaster_newsbooks.py +1 -1
lancaster_newsbooks.py
CHANGED
@@ -91,7 +91,7 @@ class LancasterNewsbooks(datasets.GeneratorBasedBuilder):
|
|
91 |
for subdir in data_dirs:
|
92 |
for file in glob.glob(os.path.join(subdir, "*.xml")):
|
93 |
text_parts = []
|
94 |
-
with open(file, "r") as fp:
|
95 |
soup = BeautifulSoup(fp, features="xml")
|
96 |
title = soup.find("title").text
|
97 |
id = soup.newsbookDoc.attrs["id"]
|
91 |
for subdir in data_dirs:
|
92 |
for file in glob.glob(os.path.join(subdir, "*.xml")):
|
93 |
text_parts = []
|
94 |
+
with open(file, "r", encoding="latin-1") as fp:
|
95 |
soup = BeautifulSoup(fp, features="xml")
|
96 |
title = soup.find("title").text
|
97 |
id = soup.newsbookDoc.attrs["id"]
|