update
Browse files- UTS_Text.py +3 -1
UTS_Text.py
CHANGED
@@ -73,11 +73,13 @@ class UTSText(datasets.GeneratorBasedBuilder):
|
|
73 |
|
74 |
def _generate_examples(self, filepath):
|
75 |
print(filepath)
|
|
|
76 |
with open(filepath, encoding="utf-8") as f:
|
77 |
for line in f:
|
78 |
print(line)
|
79 |
item = {
|
80 |
"text": line
|
81 |
}
|
82 |
-
yield item
|
|
|
83 |
|
|
|
73 |
|
74 |
def _generate_examples(self, filepath):
|
75 |
print(filepath)
|
76 |
+
guid = 0
|
77 |
with open(filepath, encoding="utf-8") as f:
|
78 |
for line in f:
|
79 |
print(line)
|
80 |
item = {
|
81 |
"text": line
|
82 |
}
|
83 |
+
yield guid, item
|
84 |
+
guid += 1
|
85 |
|