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.0
or if you want to use the trainable components (using pytorch)
pip install "edsnlp[ml]==0.12.0"
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.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3607b96f676e10bfababb207cc7a75c137d2e5508d74212f69530f8c2d4c50e3 |
|
MD5 | 96038af5f1691458b293d4f742099809 |
|
BLAKE2b-256 | ae61d2d1dd0116f91295228432b68d26a5f664b02083a721f7f260a0fda5d3e3 |
Hashes for edsnlp-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a1f959b11aa4b19b6c38a62720af67baca6a8534645df0bd2c5cf91e4cd9d4b |
|
MD5 | 353e6ca48f6665a33ec19060a36037da |
|
BLAKE2b-256 | 0d72d9bff96e593d0a51f24972b0c1df589172c817bd68f238850ffb1a5f85a6 |
Hashes for edsnlp-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f53578f641d503e92dd4e64e3eb92987a6f406563ee883ba30658ef418ed0b6e |
|
MD5 | 9bbb2f4c76d8a0d431913181bea52b3f |
|
BLAKE2b-256 | 00e059d862d59765cdefe9bfa867f275eba800d592cf2f2a5b569c6fb68fec0e |
Hashes for edsnlp-0.12.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b4b4dd72edf883ee6ba29a54a687392932723bcc6ee7ddd0a0282d25158496a |
|
MD5 | 6ce908512dfe7a401bf5adb46ba2c515 |
|
BLAKE2b-256 | 41cf40d145f65aaee1769bdd5e23192e55d3f7cf21a04c675e75f2a271a7f677 |
Hashes for edsnlp-0.12.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf7fa63a2eebf12f7ce4e2d619a678faf99f746b701e38516182b891b019a81 |
|
MD5 | 747ae713032809ebc8df4e451e7cb60f |
|
BLAKE2b-256 | f1e91127b46d5edb8dbd5d4656cb89c2263c1414bd66576eb0a8a154ffc17936 |
Hashes for edsnlp-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80814ecaeee4a1af650bc56d0c23bbd1cbc2150acd5d1010a3a910770a142fcd |
|
MD5 | 95034b95da70232610e62486516ce4fd |
|
BLAKE2b-256 | eb176b697ff4cc8151024981e56408ea248f87fc25cd1fad73b0eb7ddd5adc6a |
Hashes for edsnlp-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d78f62427ff23930648b2ab046e3f84e4f632428a0faaa7b01f1c320d12eceb |
|
MD5 | e51dcb210688060f57cf49c4db72bcbf |
|
BLAKE2b-256 | 74b36fa7721cf3b1d635c04afc394f14b3adb4f5427e6cf33ec56029f1fabee6 |
Hashes for edsnlp-0.12.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c045d00edf19c9780c6d74517fad6a0aee9880bc5b3a7575c85d92dbaa10aa2e |
|
MD5 | 240f463776b5e914fbedba9081652930 |
|
BLAKE2b-256 | 12b5b417cf5c2a66c49df8ffc8eca364acde29dc8761bdb903e4356c02fc9c91 |
Hashes for edsnlp-0.12.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9452939edb461f1c501c769cd6d28ce4694ce3ef2ae37b02aa8d5a05c0b7ab95 |
|
MD5 | de08d23ccf39db00a0dac1127ef3c138 |
|
BLAKE2b-256 | 3bab26cb43a8bce203faf93d2223a2e334baa437b3924bf89fbcc03ef5fce112 |
Hashes for edsnlp-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abf5f1f7d14071377dfe37a167a06fc086b521d01727ad155c7e210d912d2774 |
|
MD5 | e02fc0dd0ca944d42865a025ccaeaf85 |
|
BLAKE2b-256 | 2969cee200f03e4d99a27b56ef999d684924ef0b85540e0ad0e3b16acd3f648c |
Hashes for edsnlp-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fabad77ff7cd5c30596bbaa60f4716671765bd2519f9c5d44bf05157de450358 |
|
MD5 | 4f1a94b9b2a870ffa27b74abe44970d4 |
|
BLAKE2b-256 | 50043246d40efca71b98746f5b42ae087bd654a6e4ba7753d9c2806b97d3a46e |
Hashes for edsnlp-0.12.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82f5d6655fb15f900c61d4dc94a4fb05565f4712ad7b3e0c6b8f5ad24459517a |
|
MD5 | 8fa49eafaacf29a247aaf96ac831a3cd |
|
BLAKE2b-256 | 6cded345bb46127affec1c09bf13d2e536a39e31b41ed6aff0b2082aee1fbf06 |
Hashes for edsnlp-0.12.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd612fd689819bb8e470cd70274f12d2c3e54899a9127243c6d72c69e4c50f2 |
|
MD5 | d66af996aad06d1c057dca15faedd260 |
|
BLAKE2b-256 | 4a397dcb288de3480c75ad3e6f481c10dd7b1e2164d3a2d571233e8dd4e7e061 |
Hashes for edsnlp-0.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3913fbeeb1db04b87b475b762636add60c87065c2465a106071fa22aa6df0dc |
|
MD5 | 06c17b05693e36bed053a5de7ae0097b |
|
BLAKE2b-256 | 9d2579ba87ad32efda2f95ae64b19401cbbd8ec493d92868031a064d785ca202 |
Hashes for edsnlp-0.12.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b277f546f7b7538a92b0641fc25c4e64bbb906284a6c5e91b608990bc632f5f1 |
|
MD5 | aabf4eba74ea34c32dd5738b8fda9133 |
|
BLAKE2b-256 | 14ec09d4daa9db7df80e215dcea6e94291d19919721a12d9b9a8aabf87420034 |
Hashes for edsnlp-0.12.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c8fa477fe91726cb998f57013bfd3baa5628425527beb13c554c92f33337ec2 |
|
MD5 | 84a07707a660ca11efacbc50e7b27516 |
|
BLAKE2b-256 | 24424eebe57df5cad5d0e3cc935fbf5a9679900c84cdfd50582df70c27e4331d |
Hashes for edsnlp-0.12.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb9aacd36daf55f5583411db89f054f142ec78c9d565570925859ba843b9287 |
|
MD5 | a05bc0e48411da0b5aa90ea7590eca2f |
|
BLAKE2b-256 | 326cebf9f4f66c4829e72ed7ee4e2322528052018a1326729803cd129d46644f |
Hashes for edsnlp-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937b27e331282fd04581414863c979a2664304f570993c15207f55357159f06c |
|
MD5 | e781862d29a4f1da46921ea6a88d4b88 |
|
BLAKE2b-256 | 9a6c35cb116679003708bdaf890c4195aa24e29ce74097168e833ed95787fe20 |
Hashes for edsnlp-0.12.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe1a459a8bafeccc522b5ea8486423b7ca4949a9e0d8eb4d8f7d85fdbcea3cee |
|
MD5 | 3a07cfaebc381fc5fb466f4be925436e |
|
BLAKE2b-256 | df5c5cbc0b1fe4bcdb816fdece6d39a8eb20529e46101cd39cdba39b06e905a7 |
Hashes for edsnlp-0.12.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e49729c64c1248b1d61d2ae3644281dbc05fe9d4e386c248cb41b72e4cc0fc6 |
|
MD5 | 65b53965ceb479e9ddb3144bb7d84d20 |
|
BLAKE2b-256 | cafa5c2ccb94b3f95c6d3a205a0ad7aae856983e58fb753732ec54d81cf89b4f |
Hashes for edsnlp-0.12.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf7eaf63fff2768263335203305098b830cdf6513f954e2055a9c1deaf504a54 |
|
MD5 | 4fcd8a6ef5a6e4c0ec7273f06a0511ea |
|
BLAKE2b-256 | 25def70a66b2a9a566f82e20b470a71772ed3fd4fc517efa88d84bf6bb9a095f |
Hashes for edsnlp-0.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce812b86d7a28f376265d9334cc9787246f5a460da546068a57be2afa844ee17 |
|
MD5 | 51f39522998d5e68d9c9b80d92a51ead |
|
BLAKE2b-256 | 5c3ae6d67377f23f54a0e7d741b8ba3f9dd56b96a28a072988fb5d43e35e3894 |
Hashes for edsnlp-0.12.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5388147cf1d6a62270a6c5eb19056965a1d7bcfe32fe3c08ed286b7ed1b983 |
|
MD5 | d3ccc204fc48e0dc46c6553a8745290c |
|
BLAKE2b-256 | f7007fe263c13c5391482e29020845a226f145e59f08f94297f088a9748e73cd |