-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refs resolver supports text documents #1853
Conversation
This is required for the AfricanLII Citator. |
the document to use to resolve the references. References to the local document are not supported because | ||
the local document is assumed to be plain text. | ||
""" | ||
if not target or target == "this": |
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.
do these – 'this', 'thereof', 'of' – mean text ref extraction only works on English documents?
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.
No, they're magic constants that the grammar returns to indicate particular targets types. The grammar's alternative languages can use whatever they need to detect the various conditions, and then return these magic constants.
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.
See
indigo/indigo/analysis/refs/provisions.py
Line 125 in be5f2f8
def of_this(self, input, start, end, elements): |
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.
oh amazing! I think I was thrown by them being strings, but that makes sense and is very cool!
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Provision refs finders now handle text matches, too.