There is a newer version of the record available.

Published October 1, 2020 | Version v0.1.8

jenojp/negspacy: v0.1.8 pattern modification enhancements, ability to use multiple negspacy instances in a pipeline

Authors/Creators

  • 1. IBM
  • 2. University Medical Center Utrecht

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

Files (203.1 kB)

Name Size
md5:968cbfaebd23ade479043df60473e282
203.1 kB Preview Download

Additional details

Related works