update
Browse files- UTS_Text.py +6 -5
UTS_Text.py
CHANGED
|
@@ -77,9 +77,10 @@ class UTSText(datasets.GeneratorBasedBuilder):
|
|
| 77 |
with open(filepath, encoding="utf-8") as f:
|
| 78 |
for line in f:
|
| 79 |
print(line)
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
|
|
|
| 85 |
|
|
|
|
| 77 |
with open(filepath, encoding="utf-8") as f:
|
| 78 |
for line in f:
|
| 79 |
print(line)
|
| 80 |
+
if line.strip() != "":
|
| 81 |
+
item = {
|
| 82 |
+
"text": line
|
| 83 |
+
}
|
| 84 |
+
yield guid, item
|
| 85 |
+
guid += 1
|
| 86 |
|