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:
We describe a 42-year-old woman who developed superior @START_DISEASE@ sagittal and left transverse sinus thrombosis @END_DISEASE@ associated with prolonged @START_CHEMICAL@ epsilon-aminocaproic acid @END_CHEMICAL@.
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:
Only provide hints for the first (unique) occurrence of an entity.
Only provide hints for entities involved in a relation.
both of these decisions help limit the amount of additional tokens introduced in the source text.
This functionality is also exposed by the bc5cdr and gda 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 maincallback broke things, and so now it has to be a command and therefore invoked with seq2rel-ds preprocess <command> main. I am tracking this in #25.
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.