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==0.12.3
or if you want to use the trainable components (using pytorch)
pip install "edsnlp[ml]==0.12.3"
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, edsnlp.pipes as eds
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(terms=terms))
# Negation detection (we also support spacy-like API !)
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.12.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87c47760782b2733ec54725a9d77fba091f1821776ecb95dc65d3eb9da9a57f |
|
MD5 | 361646110c765ee4f59c91a03f4ebb1d |
|
BLAKE2b-256 | 2f9e332dc53151ec88753542dd786a315a1220a30d65e06aecb2adb3339c3499 |
Hashes for edsnlp-0.12.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af42bef9a254d8a14d3e798c18ea2f070f72baa6d1afe95a10ac17a6876d134b |
|
MD5 | 1328edce0cb3f224f0729ca35f9e0df0 |
|
BLAKE2b-256 | 30681d4870f6bf04626a0340347d9220c1d3aa0b718331d3d91e1167931b3b46 |
Hashes for edsnlp-0.12.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86dbd686b4d0eb532dfebff8221d9495462332571dafaa516f2d54af7e47649c |
|
MD5 | d757246b312f895c0ba87d742dca49e7 |
|
BLAKE2b-256 | ddb1ca976027c3666a1c5e8dc00a5bbc4e723e0f781bc7ef578ff00f84c43e5c |
Hashes for edsnlp-0.12.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d13f61febf1ae85ec805eb5f53ace5534ecca621c671e958f169f1ca0d521af |
|
MD5 | d8edd199919bcfa73cce7dfd4bb9182f |
|
BLAKE2b-256 | 60f1a56f99d59385f0aa098927583b10c8a056ebe9b7ea16385e37ffa37e7190 |
Hashes for edsnlp-0.12.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451dcabed0fc829c12fe06d38cbf60337e18696a229a13158e7051c816a1cda2 |
|
MD5 | efbc561e4066b63ab8c8cd454b2e8849 |
|
BLAKE2b-256 | 789e821fbef590df9b1ef26536512af35a3a7c2126107fc0774ea093d55e8c2e |
Hashes for edsnlp-0.12.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 840bd545d9b2e434343955dd21ecd51e31971c7b5d0def720e962cc83408a9d8 |
|
MD5 | 4b81c110eb9c7fdf365ec2b489ec40ea |
|
BLAKE2b-256 | cb2a679c334d3abfa114f81daa7186d3523ed9668d931e0917f187c5375f4cd2 |
Hashes for edsnlp-0.12.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4435a3bf4bbf96672c722047063430e9a84deb593d92af0e18b63dccb931dddc |
|
MD5 | e9534ea1acd1afd927cfea6032a43c4f |
|
BLAKE2b-256 | 9e62ca62fb36459209a40c33c434b8c6ca9390135a999e252a978513fc80de4e |
Hashes for edsnlp-0.12.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13c96bb0cf54b830431ff0d69100118abbee54e6e43b2c5edd0f2dedabb8d52b |
|
MD5 | de4edad5129ce3c69699d03632dc82bd |
|
BLAKE2b-256 | a6dff079ef9469d06e486def73bfc294b6dd71c20c3cea66986c6a1d2673b211 |
Hashes for edsnlp-0.12.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d349d75784ef3cf85f0d2c7a5de4779b7a42e449a4cd6e33db5aaf528c88f63 |
|
MD5 | d7f17a33b4f96aedd3d3b5f714c3c7d1 |
|
BLAKE2b-256 | 5b16db4497c86ee2f8729d0cdcf826d0e6ce5b305a61ad0892658bd9e9fb218b |
Hashes for edsnlp-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4da8f43542e2e495bbbfd40e1e8408781985d11d841f2b2ddea8fbf2697bad06 |
|
MD5 | 052f7aea30de369c459bb44812a66905 |
|
BLAKE2b-256 | ac915753745e9cb433763ff20cf04ac3349369295bbd53dbe48c57dc58e4fa8a |
Hashes for edsnlp-0.12.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38922bce7b53ab4dd31c73e15d2650cfd3ed01dcb0fa546be8327666ce39e5be |
|
MD5 | d1a24de1ef0aab4d5b1134f1a64f8eb9 |
|
BLAKE2b-256 | 3f2b304d6aa6e9bc1bcfc5997608e396102ba76b7ea70a054c19a0324e27066b |
Hashes for edsnlp-0.12.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78f3eed0bfa70ee01f506fb86eba8b48a76041c82226295d2afaf6b104fb29dd |
|
MD5 | 117280182cead02ec217070c6722bcab |
|
BLAKE2b-256 | 830a6b119f19c670cc875c4e3636a2111d3fcb7dbe6849143de15c8bf25088e4 |
Hashes for edsnlp-0.12.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8111eb06e742e48b4d6a704d379b1b5a8531f6e70768985661a9dc6623e75459 |
|
MD5 | 8b8a69981aa8b69af6319c6a5f2ed19d |
|
BLAKE2b-256 | cd98e2cc4bb3b0ca5f1f1d096608eea678bc0a250120435e8bacf81de76812e2 |
Hashes for edsnlp-0.12.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1bd4c82003f4a98269ac541b8535c130551cb73d051a605183b298c2ceb8e0f |
|
MD5 | 0a448cad53d1b048a8c0d2fdc861cd72 |
|
BLAKE2b-256 | 1fc93ed23820af0ce1e8e4dbecd3536f08a323b78618395e0b48d4dd5bc7a074 |
Hashes for edsnlp-0.12.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0157dd36cffaa47501353a8257c58b0dbef33609d88890702df45ad0d81a5106 |
|
MD5 | 3f87c060c960f7643cdb386f7759a38d |
|
BLAKE2b-256 | 34ba94ff07f8df71d61f2d4c6fa7cd21415e8c57fe0e5ec985bcbd8b391ee091 |
Hashes for edsnlp-0.12.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 713dc91a62018fb16ee31beeab5ad96fbfe4839475580a807368250fe056c27e |
|
MD5 | 5c77233252653739c5ec86cbbc18feaa |
|
BLAKE2b-256 | e063d3db0816b908e6267c120eb4f73754097e6a73b4bd3c3ccab78733c265b9 |
Hashes for edsnlp-0.12.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05873fd99c900b41f91291147a998f234d3b0728f93de4b583d9e6d6df1c1898 |
|
MD5 | 23495f76fdacfb2f91b30dc1d4712a6b |
|
BLAKE2b-256 | a4489e57f74259c18c1dff0ef521caee947de7fc3e8c6c2fb63e5c275bf73e5c |
Hashes for edsnlp-0.12.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2352fa8d53b5da6f1a080f65aad4107c93da453529f236ce802a10d437168fdb |
|
MD5 | 3c770be7f44dd8fd8007ef1255db4251 |
|
BLAKE2b-256 | 69285c318112e983e433ed9289e198a776c6cc0d2eabe49a9c3ba4c0c7dcd246 |
Hashes for edsnlp-0.12.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0bf8df3e9156b7fa6eb72491a8f346befefd2f6c8bded98dd953330a00c6ecb |
|
MD5 | 6b63a7b6531afcf4c16fa9eeb3282136 |
|
BLAKE2b-256 | aa27efa653a1b4a9f7a69e18902eb695ee9ba7077d3dc68842c75a92a22dfe3d |
Hashes for edsnlp-0.12.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d73791139c2ea1080efc7ae33a473ede335d97f0aa98d6cbf5ed015a3fa2851 |
|
MD5 | d508d72731001842159d4762fdf59427 |
|
BLAKE2b-256 | 56dc83df28d7b9ba70b2b3cd69169399c876e6dd55d650fd6e844e48ec08278a |
Hashes for edsnlp-0.12.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0bf1dc68b5fb03067a4f41fa870120842368a4cf9ee61334067231a04489b02 |
|
MD5 | 8eb9418810713129b6f5518638b12b16 |
|
BLAKE2b-256 | f5857e39dd2368fcf3c52df862edaf7552fd177478ed44ffeaba2b8e475b13a9 |
Hashes for edsnlp-0.12.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c263bf7fa03fa19825341b1196d0d35ffb7525a5d2dcb42d9ecbbbeba572fe |
|
MD5 | 9e3f54b6bf206192094699f2cb470fab |
|
BLAKE2b-256 | 394e8f407c3f15014ed25ce6090d98a2de8a33f6453d5e44b5a5af30c938c0d7 |
Hashes for edsnlp-0.12.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3e24ae461e15535f6d6f5ef478a3dae03f40b7bb802b69961e7d89e2035f486 |
|
MD5 | f373b19cd7009fbf1e71829d98df9f58 |
|
BLAKE2b-256 | 94869598528eea1fbaa77717345ef286f6f69285c9ba002ce38a9a392a671b98 |