Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
senwu committed Jun 18, 2020
1 parent e641137 commit 62f1cd4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/fonduer/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ def apply( # type: ignore
if self.visual:
# Use the provided pdf_path if present
self.pdf_path = pdf_path if pdf_path else self.pdf_path
self.vizlink.pdf_path = self.pdf_path
if not self.vizlink.is_linkable(document.name):
if not self.vizlink.is_linkable(document.name, self.pdf_path):
warnings.warn(
(
f"Visual parse failed. "
Expand All @@ -274,7 +273,12 @@ def apply( # type: ignore
)
else:
# Add visual attributes
[y for y in self.vizlink.link(document.name, document.sentences)]
[
y
for y in self.vizlink.link(
document.name, document.sentences, self.pdf_path
)
]
return document
except Exception as e:
warnings.warn(
Expand Down

0 comments on commit 62f1cd4

Please sign in to comment.