Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
illustracer commited on
Commit
8c7d7ba
·
verified ·
1 Parent(s): 5df3e35

Fix docbank.py

Browse files

There is an indentation error in the code: in the loop for processing text file content, words.append(word) and the following lines are placed outside the loop instead of inside it. This causes only the data from the last line to be preserved, rather than data from all lines.

Files changed (1) hide show
  1. docbank.py +5 -5
docbank.py CHANGED
@@ -151,11 +151,11 @@ class DocBank(datasets.GeneratorBasedBuilder):
151
  fontname = tts[8]
152
  structure = tts[9].strip()
153
 
154
- words.append(word)
155
- bboxes.append(bbox)
156
- rgbs.append(rgb)
157
- fontnames.append(fontname)
158
- structures.append(structure)
159
 
160
  # index = str(index)+'_'+str(row)
161
 
 
151
  fontname = tts[8]
152
  structure = tts[9].strip()
153
 
154
+ words.append(word)
155
+ bboxes.append(bbox)
156
+ rgbs.append(rgb)
157
+ fontnames.append(fontname)
158
+ structures.append(structure)
159
 
160
  # index = str(index)+'_'+str(row)
161