b9654fb3766f1d43bf6748f3ccc1964cfe124d9d,src/fonduer/utils/visualizer.py,Visualizer,display_boxes,#Visualizer#Any#Any#Any#,28
Before Change
imgs = []
colors = [Color("blue"), Color("red")]
boxes_per_page = defaultdict(int)
boxes_by_page = defaultdict(list)
for i, (page, top, left, bottom, right) in enumerate(boxes):
boxes_per_page[page] += 1
boxes_by_page[page].append((top, left, bottom, right))
for i, page_num in enumerate(boxes_per_page.keys()):
After Change
imgs = []
colors = [Color("blue"), Color("red")]
boxes_per_page: DefaultDict[int, int] = defaultdict(int)
boxes_by_page: DefaultDict[int, List[Tuple[int, int, int, int]]] = defaultdict(
list
)
for i, (page, top, left, bottom, right) in enumerate(boxes):
boxes_per_page[page] += 1
boxes_by_page[page].append((top, left, bottom, right))
for i, page_num in enumerate(boxes_per_page.keys()):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: HazyResearch/fonduer
Commit Name: b9654fb3766f1d43bf6748f3ccc1964cfe124d9d
Time: 2019-08-21
Author: hiromu.hota@hal.hitachi.com
File Name: src/fonduer/utils/visualizer.py
Class Name: Visualizer
Method Name: display_boxes
Project Name: HazyResearch/fonduer
Commit Name: 55f4eddf915c6afd514ea35d19b5761adb2441a5
Time: 2019-09-27
Author: hiromu.hota@hal.hitachi.com
File Name: src/fonduer/candidates/mentions.py
Class Name: MentionExtractorUDF
Method Name: apply
Project Name: allenai/allennlp
Commit Name: 992774e7c566655a1395ed2869aa1b734255dcf1
Time: 2017-09-05
Author: mattg@allenai.org
File Name: allennlp/data/dataset.py
Class Name: Dataset
Method Name: get_padding_lengths