edsnlp
edsnlp copied to clipboard
feat: allow Qualifiers to match on spangroups
Description
Proposition for allowing Qualifiers
to look for matches in sentences present in doc.spans[key]
.
It would extend the current on_ents_only
argument by adding another on_spangroups
argument
Another way of doing this could be to be more general with, e.g. a on
parameter that could be set to tell the Qualifiers to match on
- everything
- all entities
- entities present in spangroups
- entities present in a subset of spangoups
However, this approach would induce many API breaking changes, so maybe the first approach is preferable
Checklist
- [x] If this PR is a bug fix, the bug is documented in the test suite.
- [x] Changes were documented in the changelog (pending section).
- [x] If necessary, changes were made to the documentation (eg new pipeline).
Actualy some work was already done in the dates
pipelines, so I took some inspiration from it