Published October 1, 2020
| Version v0.1.8
Software
Open
jenojp/negspacy: v0.1.8 pattern modification enhancements, ability to use multiple negspacy instances in a pipeline
Description
- Big thanks to @lcreteig for pull request #20, which allows a user to update the extension name, thus being able to use multiple instances of negspacy in a pipeline:
negex = Negex(nlp, extension_name="myownname")
- Small modifications to make it easier to users to add or remove patterns on the fly:
nlp = spacy.load("en_core_web_sm") negex = Negex(nlp) patterns = negex.get_patterns() negex.add_patterns( pseudo_negations=["my favorite pattern"], termination=["these are", "great patterns"], preceding_negations=["wow a negation"], following_negations=["extra negation"], ) negex.remove_patterns(termination = "but", preceding_negations=["wow a negation"])
Files
jenojp/negspacy-v0.1.8.zip
Additional details
Related works
- Is supplement to
- https://github.com/jenojp/negspacy/tree/v0.1.8 (URL)