Performant and production-ready NLP pipelines for clinical text written in Dutch
Project description
clinlp
- :hospital:
clinical
+ :netherlands:nl
+ :clipboard:NLP
= :sparkles:clinlp
- :star: NLP tools and algorithms for clinical text written in Dutch
- :triangular_ruler: Organized in a standardized but flexible framework using
spaCy
- :rocket: Production-ready, performant, well-tested and easy to use
- :bulb: Free, open source, created and maintained by the Dutch Clinical NLP community
Contact
If you have questions, need help getting started, found a bug, or have a feature request, please don't hesitate to contact us!
Getting started
Installation
pip install clinlp
Example
import spacy
from clinlp.ie import Term
nlp = spacy.blank("clinlp")
# Normalization
nlp.add_pipe("clinlp_normalizer")
# Sentences
nlp.add_pipe("clinlp_sentencizer")
# Entities
terms = {
"prematuriteit": [
"preterm", "<p3", "prematuriteit", "partus praematurus"
],
"hypotensie": [
"hypotensie", Term("bd verlaagd", proximity=1)
],
"veneus_infarct": [
"veneus infarct", Term("VI", attr="TEXT")
]
}
entity_matcher = nlp.add_pipe("clinlp_rule_based_entity_matcher", config={"attr": "NORM", "fuzzy": 1})
entity_matcher.add_terms_from_dict(terms)
# Qualifiers
nlp.add_pipe("clinlp_context_algorithm", config={"phrase_matcher_attr": "NORM"})
text = (
"Preterme neonaat (<p3) opgenomen, bd enigszins verlaagd, familieanamnese vermeldt eveneens hypotensie "
"bij moeder. Thans geen aanwijzingen voor veneus infarkt wat ook geen "
"verklaring voor de partus prematurus is. Risico op VI blijft aanwezig."
)
doc = nlp(text)
Find information in the Doc
object:
from spacy import displacy
displacy.render(doc, style="span", options={'spans_key': 'ents'})
With relevant qualifiers (defaults omitted for readability):
for ent in doc.spans["ents"]:
print(ent, ent._.qualifiers_str)
Preterme
set()
<p3
set()
bd enigszins verlaagd
set()
hypotensie
{'Experiencer.Family'}
veneus infarkt
{'Presence.Absent'}
partus prematurus
set()
VI
{'Temporality.Future'}
Documentation
The full documentation can be found at https://clinlp.readthedocs.io.
Links
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
clinlp-0.9.3.tar.gz
(400.2 kB
view details)
Built Distribution
clinlp-0.9.3-py3-none-any.whl
(49.2 kB
view details)
File details
Details for the file clinlp-0.9.3.tar.gz
.
File metadata
- Download URL: clinlp-0.9.3.tar.gz
- Upload date:
- Size: 400.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0223a7a01ebec1402bf7d5f9b6e6c2ef9bbccf0e093405eab73c30312f066223 |
|
MD5 | 31fed76c1bb0aed5f783d8de4f6c564b |
|
BLAKE2b-256 | d8261d6383685e2a87b42b36825a4bd0d29cc0dfd075a84edcfd601debd5076e |
File details
Details for the file clinlp-0.9.3-py3-none-any.whl
.
File metadata
- Download URL: clinlp-0.9.3-py3-none-any.whl
- Upload date:
- Size: 49.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ab05b514e984757a37c922961d513fbd970eafcc2ed353dec2853b2c863e57 |
|
MD5 | b225f84389a5319878533644d406b56b |
|
BLAKE2b-256 | eb4b995bb5303bea1d19e78715f8b93dfe156ab6fa952bc6b5d2916fe51a6854 |