GithubHelp home page GithubHelp logo

pynegex's Introduction

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. These code parts are anything originated from original distirbuted negex repo.

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.

pynegex's People

Contributors

moebensu avatar

Stargazers

 avatar

Watchers

Philippe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.