Fix issue about couldn't cast array
#4
by
albertvillanova
HF Staff
- opened
alt.py
CHANGED
|
@@ -233,6 +233,7 @@ class Alt(datasets.GeneratorBasedBuilder):
|
|
| 233 |
sp = line.split("\t")
|
| 234 |
|
| 235 |
_, urlid, sntid = sp[0].split(".")
|
|
|
|
| 236 |
if urlid not in allow_urls:
|
| 237 |
continue
|
| 238 |
|
|
|
|
| 233 |
sp = line.split("\t")
|
| 234 |
|
| 235 |
_, urlid, sntid = sp[0].split(".")
|
| 236 |
+
sntid = sntid.strip() # Some lines have a trailing blank space: "SNT.102053.5598 " in data_fil.txt
|
| 237 |
if urlid not in allow_urls:
|
| 238 |
continue
|
| 239 |
|