Update inspec_ke_tagged.py
Browse files- inspec_ke_tagged.py +2 -1
inspec_ke_tagged.py
CHANGED
@@ -97,7 +97,7 @@ class InspecKETagged(datasets.GeneratorBasedBuilder):
|
|
97 |
tokens = []
|
98 |
ke_tags = []
|
99 |
for line in f:
|
100 |
-
if line
|
101 |
if tokens:
|
102 |
yield guid, {
|
103 |
"id": str(guid),
|
@@ -110,6 +110,7 @@ class InspecKETagged(datasets.GeneratorBasedBuilder):
|
|
110 |
else:
|
111 |
# the tokens are space separated
|
112 |
splits = line.split()
|
|
|
113 |
tokens.append(splits[0])
|
114 |
ke_tags.append(splits[1].rstrip())
|
115 |
# last example
|
|
|
97 |
tokens = []
|
98 |
ke_tags = []
|
99 |
for line in f:
|
100 |
+
if line == "" or line == "\n":
|
101 |
if tokens:
|
102 |
yield guid, {
|
103 |
"id": str(guid),
|
|
|
110 |
else:
|
111 |
# the tokens are space separated
|
112 |
splits = line.split()
|
113 |
+
print(splits)
|
114 |
tokens.append(splits[0])
|
115 |
ke_tags.append(splits[1].rstrip())
|
116 |
# last example
|