Update BabyLM.py
Browse files
BabyLM.py
CHANGED
@@ -128,7 +128,7 @@ class BabyLM(datasets.GeneratorBasedBuilder):
|
|
128 |
# Every other row contains POS tags. First row is the filename (we can't use filepath since the file path changes upon caching)
|
129 |
for row in f:
|
130 |
if filename == "":
|
131 |
-
filename = row
|
132 |
continue
|
133 |
if is_tags:
|
134 |
yield global_idx, {"text": text, "tagged_text": row, "filename": filename}
|
|
|
128 |
# Every other row contains POS tags. First row is the filename (we can't use filepath since the file path changes upon caching)
|
129 |
for row in f:
|
130 |
if filename == "":
|
131 |
+
filename = row.strip()
|
132 |
continue
|
133 |
if is_tags:
|
134 |
yield global_idx, {"text": text, "tagged_text": row, "filename": filename}
|