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.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2d402a89d02d5f9fe09e5a3da3a8a48accf5e8b7db60f516c7b0592822f2a87 |
|
MD5 | c266356b8bd28042b15ab0e9fe9f5a82 |
|
BLAKE2b-256 | 782a5f18c2b4fc3176ede2a20d056e75645ee202d65a4efd5c89c8a09c2065a1 |
Hashes for edsnlp-0.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5b86f7afbec32e2728218540b9ae5d729554e4ceae3d43ab02e06d48d5330da |
|
MD5 | 47cf44513cd3bbde8a198f95d74a409d |
|
BLAKE2b-256 | f562268cc30bf6aa12e58a152ed3f22c6059ea50d8a944b66ccbca6737c65bd1 |
Hashes for edsnlp-0.10.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d653dbb6887057870c431b5fe7d4c029c4675aee63aaba3af30c9f4653b1b36 |
|
MD5 | 0cf2c1b2836c946cf2d71adb8af2772d |
|
BLAKE2b-256 | 07e176c3128e26808d91c51d9c775c0fd7501ca4eac04492472d0dae1799dd41 |
Hashes for edsnlp-0.10.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5ea7e5f4b7517323b63287c39f62d0836d0440d920ef460cb509697cafc837 |
|
MD5 | 4ba759c33f0cfca65a134a7453517d59 |
|
BLAKE2b-256 | 2b99327384c0c4e9473ff64a24a51136cbc11754468967635531b02bb18ec909 |
Hashes for edsnlp-0.10.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5dab063d939eed4801d8fa3b518216694ac1213f9162b2eaf34df633c2b94f |
|
MD5 | a644b2b7f615ba1303ea1453eef9d403 |
|
BLAKE2b-256 | ed15a1a25f69189885f49ffe95f488350dffb2d40b7648e8931bb0b2bed417d4 |
Hashes for edsnlp-0.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5331eef24c8a8028b2a784dd36e4978ccf2739995323aad6f05afacfb4bdada6 |
|
MD5 | 6a75115f0c69781e547bb9dbd33af51d |
|
BLAKE2b-256 | 81708602ea91cf22ab4c779366f713781f11eb534a52e474c25625835f235d47 |
Hashes for edsnlp-0.10.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74eca2f86f2e8f41a3e6e8b1eb254d92fecb373f276fd1d9699e68b4b84f6db9 |
|
MD5 | 2fb1ec33a5656c892b2902b0036ab5e7 |
|
BLAKE2b-256 | bd8b9a304118409ecd458a6ae960a2739e5540d596e651e0056facc8be7032ee |
Hashes for edsnlp-0.10.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f79da208e2fe07f521d40d77e9dfa2741d10eba489c71f0e5f832e39ad656e9 |
|
MD5 | 977ec150f11c0b8a1071329f60dee0f5 |
|
BLAKE2b-256 | 50c34430160092acf8b3a0ead08f3a2a6c694f77c6a28109ccce37e21ef9ba67 |
Hashes for edsnlp-0.10.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07fae9356e9900e328ddfa39a0118cefaf9edad4ae884487e94d267ef3a0cb55 |
|
MD5 | 90c8d46540da7a0dec2a41357216ec52 |
|
BLAKE2b-256 | a64f5ee99f6de11ce825ad1964d295507830819b8fefdc03d3816cab67b4bf48 |
Hashes for edsnlp-0.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e59fe2e232541852a3ca88ff693055bd597e432dfed67af05917323e4ce73402 |
|
MD5 | b2afc75be5a1c7b8d6ed107eb972a3db |
|
BLAKE2b-256 | 6c889ab7c4fcd215405c6474a48f03f5220dc3bebef913ee1d113f06576b5d52 |
Hashes for edsnlp-0.10.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aa052181c29bda2bb236f8c6e8c699f9647d7ca0072aa8c5318b2e3cad082e7 |
|
MD5 | 37c341f64629ed349171a80976d6b910 |
|
BLAKE2b-256 | 074563b20e16eb9f08c5579e6a49b5fb0727678d7579d54787994dd707a29209 |
Hashes for edsnlp-0.10.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfea59c939909a2f119c183a37c1060c81ae51d8df2481238c0152436afd52e9 |
|
MD5 | 2e9fa36fc11879cec1f1740e65f859f0 |
|
BLAKE2b-256 | 648938543345cbac074072f42a242d56817c4fe5382cb8d61cc000a9bcdcff21 |
Hashes for edsnlp-0.10.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fa9d489acfd72054d903414cb5203ed4cb14d3ffab6b293efb68178b5c3515b |
|
MD5 | 9b3aa9326503d1eacbbaf7c6dfd15e97 |
|
BLAKE2b-256 | bb047dff617cc96edef5a8da61913dbc0ff247d463a973ced22122bef08005a0 |
Hashes for edsnlp-0.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51c99b6855e916e9b9c284de1750b7c65383d63f9bd0d0a3cc85d6e35dcf0397 |
|
MD5 | eed2e5e022380f33cbdfb8d40fada585 |
|
BLAKE2b-256 | 309b5332af6960347500c18a6d48085a83f838ca0259aa9e523419f6b8089685 |
Hashes for edsnlp-0.10.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e4e23c2fdd39649418a37318c8557059bdf6e9b09b465b7f769aaa3a988ae56 |
|
MD5 | 738e57961da1a6176ea1e136f28e2375 |
|
BLAKE2b-256 | 9ef7b03c8371d4596970df2487fa983c6ac212f8592ac698273b7128fa751a9f |
Hashes for edsnlp-0.10.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89b621a514a914a052734848f07a2c3ec83acb68a7b44120238c5e6aaa413086 |
|
MD5 | e353a2f1d94c8b960e891d1606b0f1a1 |
|
BLAKE2b-256 | 3b4a5c695798de19b9500b0d1ffd2dcd4d6915feba172146f825d5a226fd9d16 |
Hashes for edsnlp-0.10.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bda94c496f19d34ff6b5a709db800bacf5af9b951baff887f29f99b1f94b768 |
|
MD5 | b6204bcd5bb0bbc542c300479856714e |
|
BLAKE2b-256 | bb0409b58beb3aed8f2e5b5df872e0fec7c86472195af25366fbffbd51ef8d10 |
Hashes for edsnlp-0.10.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226b19698a4450b630baecd8e4662c3fa385adf816408e595773ccfae426eaae |
|
MD5 | ff2dd10354bb85b839713b7a1ec76c59 |
|
BLAKE2b-256 | 9eaaf71551cfc63252cfc69c8489d3759baca43c06de731ee3508c44581ca931 |
Hashes for edsnlp-0.10.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3eab88e8eb75677263f257c893c33da1cae0167ccc12f763a4bd5b2095be2e6 |
|
MD5 | a74a4d6df78e865a8c7686bf58ea3bfc |
|
BLAKE2b-256 | 884b5131774306ac0bf35070cb3464f72f4d12a9d4920c73fc3ec08147a7d887 |