Datasets:
sadrasabouri
commited on
Commit
•
889963e
1
Parent(s):
d2e729b
Update naab.py
Browse files
naab.py
CHANGED
@@ -116,11 +116,10 @@ class Naab(datasets.GeneratorBasedBuilder):
|
|
116 |
]
|
117 |
|
118 |
def _generate_examples(self, filepath, split):
|
119 |
-
|
120 |
with open(filepath, encoding="utf-8") as f:
|
121 |
for key, row in enumerate(f):
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
116 |
]
|
117 |
|
118 |
def _generate_examples(self, filepath, split):
|
119 |
+
|
120 |
with open(filepath, encoding="utf-8") as f:
|
121 |
for key, row in enumerate(f):
|
122 |
+
if row.strip():
|
123 |
+
yield idx, {"text": row}
|
124 |
+
else:
|
125 |
+
yield idx, {"text": ""}
|
|