Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds "entity hinting", which is basically the ability to insert hints as to the location and type of entities within the source text. For example, in the following text we provide hints for two entities, a chemical and a disease, that are involved in a "chemical-induced disease" relationship:
The purpose of this is so that we can compare to document-level relation extraction techniques that are not joint. I made a couple of decisions here:
both of these decisions help limit the amount of additional tokens introduced in the source text.
This functionality is also exposed by the
bc5cdr
andgda
commands with the flag--include-ent-hints
. I have not added them for the other commands, because the entity hinting code only works for PubTator formatted text. In the future, I will update all commands to first convert their datasets to the PubTator format, so that we can standardize parsing and postprocessing. Tracking that in #24.Finally, for whatever reason, adding an option to the
main
callback
broke things, and so now it has to be acommand
and therefore invoked withseq2rel-ds preprocess <command> main
. I am tracking this in #25.