jenojp / negspacy

spaCy pipeline object for negating concepts in text
MIT License
274 stars 36 forks source link

Apply Negex to Span Groups #57

Closed casparhsws closed 8 months ago

casparhsws commented 9 months ago

Adds options to apply negspacy on selected Span Groups over entities. Using the use_spans option will apply the same negspacy logic to all spans in specified span groups.

It uses black formatting and includes a test.

Other

casparhsws commented 9 months ago

Hi, it looks like there are errors in the existing test set up for test_scispacy_dep.py. I assume these existed before as they are failing on my master branch. I can make them work but I am not sure if I will understand their purpose as well as you might.

jenojp commented 9 months ago

Hi - thanks! let me review this week

jenojp commented 9 months ago

Hi - fixed the errors in test_scispacy_dep.py. This was due to the model becoming out of date. Do you want to rebase your fork from jenojp:develop ?

Also, would you mind sharing a use case for inclusion in the docs?

casparhsws commented 8 months ago

Hi @jenojp , nice one! I will rebase, add an example and I think I will change the arguments to only have an additional span_keys and default it to an empty list. I can show in the example that the default spans are under key "sc". Seems simpler on second look.

casparhsws commented 8 months ago

@jenojp Should be ready to go after checks 👍

jenojp commented 8 months ago

Apologies for getting back to this so slowly! Have been finishing a big project in my day job :-) .

Thanks again for the PR and adding to the README. I will push a release with this update.

casparhsws commented 8 months ago

Hey @jenojp, no problem. Happy to contribute :) Thanks for the great add on, it's been really helpful. This might help with a couple of outstanding issue/questions too, I can share my thought.