Skip to main content

Pypi package for negex with multilingual support

Project description

PyNegEx

PyNegEx is a PyPI modular package based on Chapman's NegEx implementation. NegEx is a rule-based algorithm to detect assertion in clinical texts.

Motivation behind PyNegEx is to provide the community with a modern python packaing for the algorithm to guarantee easy usage and a space for better maintainability, e.g. add support for other languages.

Requirements

Tested so far on:

  • Python 3.8+

Install

pip install pynegex

Usage

import pynegex

pynegex.run(text="patient hat kein Fieber",
            ent_tag="Fieber",
            triggerset_name="cotik-de",
          )
# ['negated', 'patient [PREN]hat kein[PREN] [NEGATED]Fieber[NEGATED]']

Supported languages are specificed with triggerset_name:

  • 'en' or 'chapman-en' for English
  • 'de' or 'cotik-de' for German

Speculation is enabled by default, but you can change it by passing speculation=False.

Modifications

PyNegex uses the original implementation by Chapman with support for German (triggerset by Cotik etal 2016). PyNegEx includes hotfixes for known issues with the original implementation (for more details see CHANGELOG)

Credits & License

PyNegEx contains code parts that are released in compliance with their original license which is Python 2.5.4. These code parts are essentially negex algorithm.

Furthermore, credits for the other languages support:

  • German: Cotik et al 2016.

CONTRIBUTIONS

Feel free to support this package by adding support for other languages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynegex-0.0.3.dev0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynegex-0.0.3.dev0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file pynegex-0.0.3.dev0.tar.gz.

File metadata

  • Download URL: pynegex-0.0.3.dev0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for pynegex-0.0.3.dev0.tar.gz
Algorithm Hash digest
SHA256 7eb53bc502eee0fae6d47a7eea2bd4ced916b6db9da98f5ba09a2603242a9228
MD5 c0b0e73e7bd42ad2285f7b7d57f8fe9c
BLAKE2b-256 4ee31a8ce96be57a2c3a3a53194937bd0dad4de699424e0df62d9b2c266978f5

See more details on using hashes here.

File details

Details for the file pynegex-0.0.3.dev0-py3-none-any.whl.

File metadata

  • Download URL: pynegex-0.0.3.dev0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for pynegex-0.0.3.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f50458e9b47e6bf14bde2fabe0b41a9177c7c565ab61453bce96587c278b5c
MD5 d58de3c7e2fb5c206507ba6c894eede9
BLAKE2b-256 b0552c3e226c1c8b002d68f6724e01f087aabd719e5d07254ff8d810f04f4119

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page