edsnlp icon indicating copy to clipboard operation
edsnlp copied to clipboard

feat: allow Qualifiers to match on spangroups

Open Thomzoy opened this issue 1 year ago • 1 comments

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).

Thomzoy avatar Sep 06 '22 15:09 Thomzoy

Actualy some work was already done in the dates pipelines, so I took some inspiration from it

Thomzoy avatar Sep 07 '22 11:09 Thomzoy