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.10.5
or if you want to use the trainable components (using pytorch)
pip install "edsnlp[ml]==0.10.5"
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.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 932f881b3ad20ba6a6a5afda69f8492b142fde8e07cc1e1317e727b2f02d0751 |
|
MD5 | 9acb9da65949cf975e22f94f77165ec9 |
|
BLAKE2b-256 | 51b3d59cad28a78b8ba4d2bd30ee9022e804c2221a72a5158e67c7bcce247073 |
Hashes for edsnlp-0.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3df5812d9d1e6edc4f5e4709102950b15d79f7f73d1bd4a542adaa5450ab8c3 |
|
MD5 | 36f21ac9a3e57130a95795fc0e0bb006 |
|
BLAKE2b-256 | cfa315fc65324b1b3bed8d45d3b64f6178c1b8b46f185a7232efe8d524eb369c |
Hashes for edsnlp-0.10.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7faab540465fb0a8d1f1ba8a84ed0472283b1f11ac4b6e39610efbfacc6843 |
|
MD5 | a185a21f0ff51125ae388c50feb56e79 |
|
BLAKE2b-256 | d193643997b3576e8c2e2b4ff97e6ab287838d5314486e8a91c72e5135a1ddb8 |
Hashes for edsnlp-0.10.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a2d3a3213cbc2e5892ac4df117881120fd65e0bacbc0560fb5578405821c551 |
|
MD5 | 247ae9ce35e7ae82c502351a2ea98e05 |
|
BLAKE2b-256 | 1d3fdea5395a984fd89f526d47ad076c26005f90c64227d812a0f35d30f2ac1e |
Hashes for edsnlp-0.10.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0954196da09d84387eb983ce7cb133c717ec7c19bfcaecf8bb927ec614df449 |
|
MD5 | dfe9791c494744b82c7182eca533be9f |
|
BLAKE2b-256 | 0752f8291298420502600c8acf1cc1b34911524ac2058380be9097ba5e6b4150 |
Hashes for edsnlp-0.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e65865b5b90349245cc13a409ab1532de4286cf1ca7a50225e5757ddcae4da41 |
|
MD5 | 0f3e62c16be3f0d94fe1ee5aed63d76a |
|
BLAKE2b-256 | 2123eef9f5a40b9b918197da7c2b8fa29821a828a9223023c43947ba9ece8501 |
Hashes for edsnlp-0.10.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbacaa73b66dd3e0f5e684c145d60688a0fdff1749926ecd23097644c6fe7084 |
|
MD5 | 8d737d673e17c025e946b30e08765321 |
|
BLAKE2b-256 | 66fe94e9758ea788caef3cc7ba0bd5cdda06af6c4ef5c7b6f1be1fd6f17841cd |
Hashes for edsnlp-0.10.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa97b54111ee754bad19cb3dd945306605e87f39eb0f1dfecdd2377bf55db901 |
|
MD5 | 362758610931babcbf50828f70b31e0a |
|
BLAKE2b-256 | 3aec96c8c68f8ca3befcc6ff9d32f66485beef08a5547c807180d515cdb75a83 |
Hashes for edsnlp-0.10.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a916dd55e857d6720f775b18c2cea85688600c34c53b4b593d51de5ab254d2 |
|
MD5 | 24ca6c15c6530bd94295ed3c03d60275 |
|
BLAKE2b-256 | b681e671c9419136efcff7e6bfe9c3ce71c10426627b2a412121e70a757a2353 |
Hashes for edsnlp-0.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdf5d2ffc080ecd4bef770ce404f9f1da62fec0ae918674c88a8d3232f2ad82 |
|
MD5 | ee293272d5c52588bfe3716592e64e22 |
|
BLAKE2b-256 | f3f2a2bee67498dff940f7611effb477cbda54ade30930257f90ce86f0b71de9 |
Hashes for edsnlp-0.10.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a53d0ad4b056fc3b14a59344baac8d189a0a864981d7281b57cdb9a52a0f262 |
|
MD5 | 5eee904cd2fde4db87d4982c6ecbcacb |
|
BLAKE2b-256 | f336eaf4946ad39f836e1f268e41c2da997cc06311a454c9bde1b57e4b7435ee |
Hashes for edsnlp-0.10.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ce7d0966ffcf174903b8eb2ff06b4a842363796f5fa717ec6796252e32a9d15 |
|
MD5 | 93065254b7355ebf3c7c33ff5b6579d6 |
|
BLAKE2b-256 | ecd3c6a863d7297a428be32d1418a9a8931b41b0b73abd0777a224bd3bace480 |
Hashes for edsnlp-0.10.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cad73fcd3d3879fa4eec4535f1afabd4d94e06827f7195f2c00561f15b6a0bd |
|
MD5 | 68ba85efaaa1b46031cc0ad599d13c28 |
|
BLAKE2b-256 | fc60f5e7040b2af33395353f642331a39a9788b419271961ef7489cf29bbc691 |
Hashes for edsnlp-0.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e565765a426b7f92787f6aaffb1b14a959931ad27f5596f41194e0e2876a750 |
|
MD5 | 4d204902ea48503d2ca4b9cd714347df |
|
BLAKE2b-256 | c618fc421434ebc1813ec53adfa62ae4bae8a4fe2b60d48c1ffd92f12d3167dd |
Hashes for edsnlp-0.10.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06eee3954dc19020b18cf43632b7b89e06691649f37676bb632f33d54245c69e |
|
MD5 | b62f15697d3d2bf2b3f7bf69dfee0b2b |
|
BLAKE2b-256 | a9402e1f7d6eed12e4a319daa6a50d9791521c9e26509828769e2e740c0128e6 |
Hashes for edsnlp-0.10.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800a53dee2f35416f19f6c6b979d2ef9e57d5ee6d43f11fb71e11ad17c5bc31f |
|
MD5 | 77cac0311e86ef10c0766ed1b920825f |
|
BLAKE2b-256 | 1d580cd58b764d35a6a2eaf57215de9ec5b3792630e4d2d3a78f5558ed322eec |
Hashes for edsnlp-0.10.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c0248f8fc68240ee85b610f41eeb59cffded183607a26b61e3c1459f276f47 |
|
MD5 | 56ebc8e7476d7753b0ae6046a5ba36b6 |
|
BLAKE2b-256 | 7af6ffb7277588b41169634fe1be77b8b771f2470a046982cd7c19fde098599d |
Hashes for edsnlp-0.10.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8ef0a42b5ab1e438a0b42b9fa12dec5ba5a00ff9c4244f44ff7aa5cbee7d5c |
|
MD5 | 870e408dc9c641a68292fe66a0ceeac9 |
|
BLAKE2b-256 | 99805f6525035d9fff957c4262b87e8b374e003505681f2acfa453edbdcb1c12 |
Hashes for edsnlp-0.10.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e398be7d034ecd45a5582968d396b9c391a9e99017f5dd0c4b466343e19577ac |
|
MD5 | 46c6df279425006231465a13327d2599 |
|
BLAKE2b-256 | 8a0504941c1262c3ae9349fafde015d552b13b74ceb4aea318a461eafd9227f2 |