sheikh commited on
Commit
59a9f01
·
1 Parent(s): 46a5f75

Update SLR.py

Browse files
Files changed (1) hide show
  1. SLR.py +2 -2
SLR.py CHANGED
@@ -101,7 +101,7 @@ class SLR(datasets.GeneratorBasedBuilder):
101
  ann_dir = os.path.join(filepath, "annotations")
102
  img_dir = os.path.join(filepath, "images")
103
  for guid, file in enumerate(sorted(os.listdir(ann_dir))):
104
- words=[]
105
  tokens = []
106
  bboxes = []
107
  ner_tags = []
@@ -115,7 +115,7 @@ class SLR(datasets.GeneratorBasedBuilder):
115
  for item in data['categories']:
116
 
117
  labels=item['name']
118
- words.append(labels)
119
  ner_tags.append(labels)
120
  for item in data['annotations']:
121
  bbox=item['bbox']
 
101
  ann_dir = os.path.join(filepath, "annotations")
102
  img_dir = os.path.join(filepath, "images")
103
  for guid, file in enumerate(sorted(os.listdir(ann_dir))):
104
+ words=["Borrower", "BorrowerValue", "City", "CityValue", "PUD","PerMonth","PerYear","State","StateValue","Table"]
105
  tokens = []
106
  bboxes = []
107
  ner_tags = []
 
115
  for item in data['categories']:
116
 
117
  labels=item['name']
118
+ #words.append(labels)
119
  ner_tags.append(labels)
120
  for item in data['annotations']:
121
  bbox=item['bbox']