-
Notifications
You must be signed in to change notification settings - Fork 78
Add get_bbox() to Sentence and (Temporary)SpanMention, and deprecate bbox_from_span and bbox_from_sentence #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add get_bbox() to Sentence and (Temporary)SpanMention, and deprecate bbox_from_span and bbox_from_sentence #429
Conversation
…bbox_from_span and bbox_from_sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but looks like tests fail now.
This reverts commit 69f3dd4.
I think I fixed the issue. |
Codecov Report
@@ Coverage Diff @@
## master #429 +/- ##
==========================================
- Coverage 82.59% 82.44% -0.16%
==========================================
Files 86 86
Lines 4366 4385 +19
Branches 810 812 +2
==========================================
+ Hits 3606 3615 +9
- Misses 572 582 +10
Partials 188 188
|
Thanks for this PR! What do you think about having a |
Having a fonduer/src/fonduer/parser/visual_linker.py Lines 31 to 33 in bd79688
By defining type aliases like below:
This could become
However, |
A good example would be: alias for Throtter Currently,
with
to
|
This PR has two benefits:
Tuple[int, int, int, int, int]
toBbox
.bbox_from_sentence
andbbox_from_span
. Just usesentence.get_bbox()
andspan.get_bbox()
. This is actually the benefit from using OOP.P.S. There are many more spots where OOP (object-oriented programming) is more suited.