Andreas Sünder
commited on
Commit
•
24b9a21
1
Parent(s):
3c725d1
Remove slash for path head checking
Browse files- simplebooks.py +1 -1
simplebooks.py
CHANGED
@@ -116,7 +116,7 @@ class SimpleBooks(datasets.GeneratorBasedBuilder):
|
|
116 |
_id = 0
|
117 |
for path, file in files:
|
118 |
head, tail = os.path.split(path)
|
119 |
-
if head.endswith(f"{subset}
|
120 |
for line in file:
|
121 |
yield _id, {"text": line.strip()}
|
122 |
_id += 1
|
|
|
116 |
_id = 0
|
117 |
for path, file in files:
|
118 |
head, tail = os.path.split(path)
|
119 |
+
if head.endswith(f"{subset}") and tail == f"{split}.txt":
|
120 |
for line in file:
|
121 |
yield _id, {"text": line.strip()}
|
122 |
_id += 1
|