Skip to content

Commit 18f8a59

Browse files
author
Hiromu Hota
committed
Fix the order of args to Bbox
1 parent cbaa25a commit 18f8a59

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fonduer/parser/visual_linker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def _coordinates_from_HTML(
161161
word_id = (page_num, i)
162162
pdf_word_list.append((word_id, content))
163163
coordinate_map[word_id] = Bbox(
164-
page_num, y_min_line, xmin, y_max_line, xmax,
164+
page_num, y_min_line, y_max_line, xmin, xmax,
165165
)
166166
block_coordinates[word_id] = (y_min_block, x_min_block)
167167
i += 1

src/fonduer/utils/visualizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ def display_words(
9595
Bbox(
9696
sentence.page[i],
9797
sentence.top[i],
98-
sentence.left[i],
9998
sentence.bottom[i],
99+
sentence.left[i],
100100
sentence.right[i],
101101
)
102102
)
@@ -109,8 +109,8 @@ def get_box(span: SpanMention) -> Bbox:
109109
return Bbox(
110110
min(span.get_attrib_tokens("page")),
111111
min(span.get_attrib_tokens("top")),
112-
min(span.get_attrib_tokens("left")),
113112
max(span.get_attrib_tokens("bottom")),
113+
min(span.get_attrib_tokens("left")),
114114
max(span.get_attrib_tokens("right")),
115115
)
116116

0 commit comments

Comments
 (0)