Remove pathlib
Browse files- cst-wikinews.py +1 -2
cst-wikinews.py
CHANGED
@@ -17,7 +17,6 @@
|
|
17 |
"""CST Wikinews classification dataset."""
|
18 |
|
19 |
import csv
|
20 |
-
from pathlib import Path
|
21 |
from typing import List, Tuple, Dict, Generator
|
22 |
|
23 |
import datasets
|
@@ -85,7 +84,7 @@ class CSTWikinews(datasets.GeneratorBasedBuilder):
|
|
85 |
def _generate_examples(
|
86 |
self, filepath: str
|
87 |
) -> Generator[Tuple[int, Dict[str, str]], None, None]:
|
88 |
-
with
|
89 |
csv_reader = csv.reader(
|
90 |
csv_file,
|
91 |
delimiter=",",
|
|
|
17 |
"""CST Wikinews classification dataset."""
|
18 |
|
19 |
import csv
|
|
|
20 |
from typing import List, Tuple, Dict, Generator
|
21 |
|
22 |
import datasets
|
|
|
84 |
def _generate_examples(
|
85 |
self, filepath: str
|
86 |
) -> Generator[Tuple[int, Dict[str, str]], None, None]:
|
87 |
+
with open(filepath, mode="r", encoding="utf-8") as csv_file:
|
88 |
csv_reader = csv.reader(
|
89 |
csv_file,
|
90 |
delimiter=",",
|