Datasets:
fixed txt reading
Browse files
TGIF.py
CHANGED
@@ -93,9 +93,9 @@ class TGIF(datasets.GeneratorBasedBuilder):
|
|
93 |
dict = {}
|
94 |
for path, f in files:
|
95 |
if path.endswith(split + ".txt"):
|
96 |
-
txt_file = f.
|
97 |
for line in txt_file:
|
98 |
-
line = line
|
99 |
dict[line] = []
|
100 |
for path, f in files:
|
101 |
if path.endswith("tgif-v1.0.tsv"):
|
|
|
93 |
dict = {}
|
94 |
for path, f in files:
|
95 |
if path.endswith(split + ".txt"):
|
96 |
+
txt_file = f.read().decode("utf-8").split("\n")
|
97 |
for line in txt_file:
|
98 |
+
line = line
|
99 |
dict[line] = []
|
100 |
for path, f in files:
|
101 |
if path.endswith("tgif-v1.0.tsv"):
|