codebyzeb commited on
Commit
7813eb4
1 Parent(s): 80e9572

Update BabyLM.py

Browse files
Files changed (1) hide show
  1. BabyLM.py +1 -1
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}