Modular, fast NLP framework, compatible with Pytorch and spaCy, offering tailored support for French clinical notes.
Project description
EDS-NLP
EDS-NLP is a collaborative NLP framework that aims primarily at extracting information from French clinical notes. At its core, it is a collection of components or pipes, either rule-based functions or deep learning modules. These components are organized into a novel efficient and modular pipeline system, built for hybrid and multitask models. We use spaCy to represent documents and their annotations, and Pytorch as a deep-learning backend for trainable components.
EDS-NLP is versatile and can be used on any textual document. The rule-based components are fully compatible with spaCy's components, and vice versa. This library is a product of collaborative effort, and we encourage further contributions to enhance its capabilities.
Check out our interactive demo !
Features
- Rule-based components for French clinical notes
- Trainable components: NER, Span classification
- Support for multitask deep-learning models with weights sharing
- Fast inference, with multi-GPU support out of the box
- Easy to use, with a spaCy-like API
- Compatible with rule-based spaCy components
- Support for various io formats like BRAT, JSON, Parquet, Pandas or Spark
Quick start
Installation
You can install EDS-NLP via pip
. We recommend pinning the library version in your projects, or use a strict package manager like Poetry.
pip install edsnlp
or if you want to use the trainable components (using pytorch)
pip install "edsnlp[ml]"
A first pipeline
Once you've installed the library, let's begin with a very simple example that extracts mentions of COVID19 in a text, and detects whether they are negated.
import edsnlp
nlp = edsnlp.blank("eds")
terms = dict(
covid=["covid", "coronavirus"],
)
# Split the documents into sentences, this isneeded for negation detection
nlp.add_pipe("eds.sentences")
# Matcher component
nlp.add_pipe("eds.matcher", config=dict(terms=terms))
# Negation detection
nlp.add_pipe("eds.negation")
# Process your text in one call !
doc = nlp("Le patient n'est pas atteint de covid")
doc.ents
# Out: (covid,)
doc.ents[0]._.negation
# Out: True
Documentation & Tutorials
Go to the documentation for more information.
Disclaimer
The performances of an extraction pipeline may depend on the population and documents that are considered.
Contributing to EDS-NLP
We welcome contributions ! Fork the project and propose a pull request. Take a look at the dedicated page for detail.
Citation
If you use EDS-NLP, please cite us as below.
@misc{edsnlp,
author = {Wajsburt, Perceval and Petit-Jean, Thomas and Dura, Basile and Cohen, Ariel and Jean, Charline and Bey, Romain},
doi = {10.5281/zenodo.6424993},
title = {EDS-NLP: efficient information extraction from French clinical notes},
url = {https://aphp.github.io/edsnlp}
}
Acknowledgement
We would like to thank Assistance Publique – Hôpitaux de Paris, AP-HP Foundation and Inria for funding this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for edsnlp-0.10.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e1db0c7dbf21c2400a49a041a8bf7ef8fc48748e1ff961ea2f1856c029320e |
|
MD5 | 4564f6d8ae9c43c8141cf9bce6ee47bc |
|
BLAKE2b-256 | f42e941619729588f3d2a83a0b49a27098ed901270f7362739ae31de47cdba6d |
Hashes for edsnlp-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c122f7c006554845a24a5c2a63ce82fe542671e173f5267d9516742fc308853 |
|
MD5 | 0899d855ed4a61ca06cf947a8fcef878 |
|
BLAKE2b-256 | 2eb5922184ac4ce68af07b3b4fa2e2a0a0861f52489f9b49629c5a0fa5e1cef1 |
Hashes for edsnlp-0.10.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0171216ba7171f9449826ebd37bf70d32e7ddc29dfab28d6f4485da576d192f |
|
MD5 | 86f8e3f4e9b37b0dfa4ed045901fa889 |
|
BLAKE2b-256 | 12d70659c6e4629bd636fe776a25f9328247b4b9cfa85e4dea7317284bdadd5a |
Hashes for edsnlp-0.10.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bab688c6095f0763a6545dd2feafbc137b85cfef5fed3c5925d1a6b806a96706 |
|
MD5 | ef3011bfc52362fc4f699783c435df11 |
|
BLAKE2b-256 | d2030a3b20098f520a1ca0feea0b755625aef577164c101455fe45938154644e |
Hashes for edsnlp-0.10.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4404f8fad5e2b55834ceb35a8badaef023804161d4549d340f77b4221cff9232 |
|
MD5 | 31a81dadb87990896a97feaae05c4115 |
|
BLAKE2b-256 | aa57e73fb0aa8c822fca17c4d9cf5e3ef0ba13d918768da209b56cf5bec18589 |
Hashes for edsnlp-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54a6b6c37ca3ebccb00df83bbee1fff674f072a5a4908468316d3ba6ef15a2c3 |
|
MD5 | 376034b28120e65d9e0b9528ec5f2a33 |
|
BLAKE2b-256 | 1b9044ef5f4d8c6bfca921565ac88bdc0f1c1958036e4f675d3869d1592b83d5 |
Hashes for edsnlp-0.10.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0698e3703b2b6260f97ea69e692b1bf8b937a87fdfb2b3acdbac93aa1265aed6 |
|
MD5 | c82ee11e8787eab67fc341c5df9facfc |
|
BLAKE2b-256 | 275e8c99f65d4cda6df2ce464535a149652a7423f4846981163bc8f49b01018f |
Hashes for edsnlp-0.10.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c277bb757e65a0f5a64163e0c36dc2e957efaca2c9017f796fab6d005398f0cf |
|
MD5 | f6cc6bc23ecfdbabbe84a6b0478faa52 |
|
BLAKE2b-256 | f83068fbe501ae1d2638321526e97bf1a3fde156a3cded9d8e2198dfff978ba8 |
Hashes for edsnlp-0.10.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8832461f533f78a4f528c73d318389e4601a3eeea223602daea1e05058af0e |
|
MD5 | ba197c2b96fa898a44bfd47e3bac1085 |
|
BLAKE2b-256 | 9ef7c7e37d4896829c6a99e37f46789e2236614cbbe4ad0acbb4428257afd4ae |
Hashes for edsnlp-0.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 915125add90aede20ad7962ce4963b4b2c7f2c1311e7761362206499a00dfa5a |
|
MD5 | e5cea4c6029833eaab07a9d290c147a9 |
|
BLAKE2b-256 | 91820ea97e9db5e5434654af5998847af9d0bb5b1a4472c709e6883159b73465 |
Hashes for edsnlp-0.10.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1636934a497748832a0ec0bb996dea64e07dcb888c30db57deb9c27ca9b27426 |
|
MD5 | c00c0f1a250bab3c955695992e6c5093 |
|
BLAKE2b-256 | 41d981f7ebbce4e67b8844fe1b63e8a747d83ef7b85d8640aeb60615a2f6ff6d |
Hashes for edsnlp-0.10.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 398f961553dc317bfc46e5db48919efbbe11c97631b7852a0a99d03a280ea42a |
|
MD5 | faab6dddf679370d62cecdd3ab73b203 |
|
BLAKE2b-256 | 9a74dce8a7d4522bb1644989577400e380e7f4d8c20aa71ce89b0fb7dbe5cb29 |
Hashes for edsnlp-0.10.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b92415746b241d8df0b43834ceff3d3d85d90c364dc3d82a1d6ed15f53a61cfd |
|
MD5 | 79e7d2b6f331caed41e9547aa4f9112c |
|
BLAKE2b-256 | 9c3d319372bde48b50bbdf55fdd9715b3a205ca32cf09ff2a259072013e49261 |
Hashes for edsnlp-0.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 036be77f127e2581cd572f01b09632b25d78c69d4a827b325e502b4ff3757531 |
|
MD5 | 9ccc0ba22937013eb7182a05d516905d |
|
BLAKE2b-256 | 3b3b4923f9cef89b452c822bd04ea37e569a19c30dbca22668e9a6ee4d0e726d |
Hashes for edsnlp-0.10.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8a095433f629561a5b2fdd0033a3bd7763bd0a043501a5f9cc7f50894798d97 |
|
MD5 | b883f4f5eeb9874eca3e02584bd35396 |
|
BLAKE2b-256 | 40551848bad777e5229ed879473dcaaea31d701c3cd737048f42862598b3b6b2 |
Hashes for edsnlp-0.10.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 447e5c93d1f537c1aade485c08410838b1fdbfd45a166656156e6d1e394e7d5c |
|
MD5 | 1a150e00537f09e7608419e7b6abc3a4 |
|
BLAKE2b-256 | d633f08d4607257ec083a50771e71e0a10563fc86f8084a15ea6901585beb224 |
Hashes for edsnlp-0.10.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 380cc97f868080b0c795adbf141e605c42a3cfe992381bd500b642125c758cdc |
|
MD5 | d54dbc0c82af0254506c05a76c1a9fd5 |
|
BLAKE2b-256 | da811990cd9106cf58555ed9a1e1c80cd1cbf9be7bb5173e7feb8b524df8a846 |
Hashes for edsnlp-0.10.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7a422942731dbfab46f4f3c68a61a4b0d407e2bb8d9dd427ca40fa455fbda43 |
|
MD5 | d3daa8000fb69409c6940ca6c2c7a784 |
|
BLAKE2b-256 | c959ad316768faadc7ffe0ac0da05af3f03d964943a1b66bbde2491e959214b6 |
Hashes for edsnlp-0.10.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a93894331ad744fc08605752358b0bc4ba87a2cc506d83ecd1dba3477d680cd5 |
|
MD5 | 1c5fb5da4128802e6605b54fdd557803 |
|
BLAKE2b-256 | 8b73cbb036315c078b2c4d1f2c569eee1873fb44672b4bd97d001070a5578b2c |