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.1
or if you want to use the trainable components (using pytorch)
pip install "edsnlp[ml]==0.12.1"
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.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eec141548c7cfcd182bf9524a40e1c2c7cad6c09b3421ae792f96174ceb27a35 |
|
MD5 | 3da1078fdf3c4a06fffbea77478dd302 |
|
BLAKE2b-256 | e09d3ad43d6c7626250f9fc5e25031346e42e589978b28c13bb928f527d7722c |
Hashes for edsnlp-0.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050a242b6cd780924e6e36e64ce6259da4bf5033432fba077c01b73ccddd9fc6 |
|
MD5 | 10c19b70c089e0a54fb55f5f718ee907 |
|
BLAKE2b-256 | b43bb9d910db53437366e418716bc1ebddaaad80dc145d85a1997263546a52bd |
Hashes for edsnlp-0.12.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ea1e1b12bd86c50a7069a3ee5884d4e7416fb89afadfbbf5b585227b798eb6 |
|
MD5 | bd70267da35484ae807a8b01f1dd6752 |
|
BLAKE2b-256 | c7103e8a98604966d292d2ebc5ee510abd20fb1ea9d912e227b1395caf7dbaed |
Hashes for edsnlp-0.12.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36bb805c42bdc606478cabfe6b68c96c990fca0227a0a18462bb30b7335a93d |
|
MD5 | 46043f7660f2f5b64492f41d34d308bf |
|
BLAKE2b-256 | d32a7b1e4fdb97b9a1085a8404a286e0e95f06c3b01223305b2ed05bee21d3ee |
Hashes for edsnlp-0.12.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ba74f7e26f9c35682e84ca90c5ee8589ba14bfb7dfcc2bcbbbad37f9d3b0478 |
|
MD5 | b91851635511bf71027ac1801f4ac5f6 |
|
BLAKE2b-256 | 375115740a9049b308ebb3014d4e1869acb15545a7c1c9eb026b9d18a03376b8 |
Hashes for edsnlp-0.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86b1dc0ecebb18c986b09f815b78683ce76b9e4675bf51c60bd7c283dab9a314 |
|
MD5 | 5ebd3bc4262b72bef45b5e20a32734bb |
|
BLAKE2b-256 | 278020f19749059636d05d9a1c297ef2fee3f2f3b5ef90fa0f6d020c64792043 |
Hashes for edsnlp-0.12.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 634fd21ffe566c8a3c5c10b16ff3325c0b66a24ca2265ab3b4c982f9bd94101d |
|
MD5 | b28d248951277db6b0806b77baed858d |
|
BLAKE2b-256 | b0252ba6d05e078328137cfa063bb5a6382ab4b4365e595212b04df487e4dbb3 |
Hashes for edsnlp-0.12.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0104fc5a497e8542d39f0b79da2757451d6452233b863560c32ea5ec3e5aeb63 |
|
MD5 | c251f4ea55b51890748dd3ad3d6fbf31 |
|
BLAKE2b-256 | 176f91158d10a6dfe3229f53da13747e57bcf8dc59912912d049a5447253ca93 |
Hashes for edsnlp-0.12.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8de470e492539deb4cad28a89a4dc1048dfb661e7e0612c8726ae1e866622e |
|
MD5 | b80eb4978933425783abc6aece72f8a1 |
|
BLAKE2b-256 | 1c1afb1058506742858c746f9ecdab7131e81ca1cf4a5fba512e26ffd2747514 |
Hashes for edsnlp-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f26974d230e07093096883aff801a5d77d7ea3aae9ec05877d3dd8b471be94c0 |
|
MD5 | 15ad92eaa47813f340adc63af70e3bef |
|
BLAKE2b-256 | 2bb4dfbad534689ef4a30053272d9735ff5901379aaf03e6de5af53e27cc7a07 |
Hashes for edsnlp-0.12.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e45a0fd771e076b59250477785a8a8e7a17e427e7254af248f911b10f634ef46 |
|
MD5 | ab3c7cc32a24fd4d6021b51fab160b3a |
|
BLAKE2b-256 | 4a3913b3dfda9880c7db7761e676014d3a996cadec6557e688dacd77378ab338 |
Hashes for edsnlp-0.12.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e27bec231cf4ad2874cb30dcdd9697cbcd8467f46dcd1a5a7562e903f07872a |
|
MD5 | 9a9fd20435dd4c0f23392dda79c7b14f |
|
BLAKE2b-256 | 2a4f15fe133683f3cf7a94c42d2e7ef7caa84c397b243d1d660a09759753167c |
Hashes for edsnlp-0.12.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc93fefc45e1f9acfb9373f5783dda7b891f2365322e2fe7b34cb725607a3708 |
|
MD5 | 72fbad2cd6f1637593ff21accfd192ec |
|
BLAKE2b-256 | b5ea3ff8325ae0435756db03e9305c1a4b832544344401eb7e83ec6bb403b3b9 |
Hashes for edsnlp-0.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33df29f0084c14c70b284169914a7355fb69c01516a1baa4365158a66373c468 |
|
MD5 | 389c007f8fb054a9e3425ab4c3676ffe |
|
BLAKE2b-256 | 5dc2f9407a4aea8fe9a6bac3f6a34174be542ca53bda4253ab95650019d4c6a2 |
Hashes for edsnlp-0.12.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd786b9eb409e2a3e5db95f5cac4cdc8faa6fc65f83aaf412028bbc3bde7a180 |
|
MD5 | b9fd3a45fb5dceec8e667959db4a0698 |
|
BLAKE2b-256 | 445afc990b7a54720cbb3339fbf73a9310884b26412a01e93174b798685b859c |
Hashes for edsnlp-0.12.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d5dd9820385e1b1ffae149d66041a1a8f34b95808bc5ad366c6ddf6e2b177ad |
|
MD5 | 07a4e667718fe16ecfb3d162768e713a |
|
BLAKE2b-256 | c6db4f00586d132606d23a251c411343da0ef2d947ec8fa5125af0915fcb1d1b |
Hashes for edsnlp-0.12.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26c16682d623c5a69966b786d284b7394ad462faf049e21c9afa5ab736348ffe |
|
MD5 | ac0df788eae959a61597012d65047651 |
|
BLAKE2b-256 | 4e682dfd72d88f23e3419b983c38d347437b2f7e1bd5c8af45b7e6075ad020bf |
Hashes for edsnlp-0.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f17b682ff8907bac45c65b68e985c8cb4e4ebad68566fb58123b1fda91d4451c |
|
MD5 | 46c37a3cced05bf9cf8c4dd2b6d5210b |
|
BLAKE2b-256 | a94a120b027764706ca8779f766ba3d27fafb801830a600c54e8c2608d2066da |
Hashes for edsnlp-0.12.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8d4e64126bea2f9076cd1cf7e213bcf510f72fa85cc221493a546756f92bde2 |
|
MD5 | 84ff083f2b514524eba0de47b5c419af |
|
BLAKE2b-256 | b63d515cacab0d21a6fd8401e1f9907da9fe9283b0812b7e6f18fb14ae44d440 |
Hashes for edsnlp-0.12.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5d2e348e182bb65260493cc56909535f3ad8c7786ed2cb698002d1fc971f15b |
|
MD5 | 0bea3df518e1d06733c8f00ac62e891b |
|
BLAKE2b-256 | 64c7f81f9ef8a9bdcf2228dbf5a07ed24bd1f573174cd6ab8f23b8e0ddb1e99b |
Hashes for edsnlp-0.12.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 650dbe88ab69c3dd97260dee3993dfd1db3ded7dc04af2d0bac025c195582943 |
|
MD5 | 695380a02e679be81435ef96f7c609af |
|
BLAKE2b-256 | cc3c9be800c94db51918fa9eac2f30455b0b0b876a30a444b5cbe318bb3ff0b6 |
Hashes for edsnlp-0.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc59abcaa60ddc737d834b973ca641393934d1bd044e8674fbac6c1c7b448bd |
|
MD5 | 7c336a1514c06906204c1c9b18d43dc0 |
|
BLAKE2b-256 | c1a09dd1dc11cd536b8c736592cff70ce84e89afc7e8d48efbdb7bf41daaf900 |
Hashes for edsnlp-0.12.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98086d1b382c46cd1aa3bef525422cfd81d976e7e8521eb0695bedf4f6d5b64 |
|
MD5 | 263610b88f0027b7d0b0af9ae0cd4349 |
|
BLAKE2b-256 | bbef472efdbbbf394f4dbf8e99f7d2e2cd27e168727aca832bfe0eaaa0a5be68 |