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)
Pretermeset()<p3set()bd enigszins verlaagdset()hypotensie{'Experiencer.Family'}veneus infarkt{'Presence.Absent'}partus prematurusset()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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clinlp-0.10.0.tar.gz.
File metadata
- Download URL: clinlp-0.10.0.tar.gz
- Upload date:
- Size: 421.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f70353a31e820bb12d852dcb832909de4a6a8578a1b1b143b8ee508e0e2a83
|
|
| MD5 |
69ee61af107456f41153e0aba2851eae
|
|
| BLAKE2b-256 |
8b04eeb07e1d44e193be68805eac5108c9ddf12021514fccdc9b0144a539615a
|
File details
Details for the file clinlp-0.10.0-py3-none-any.whl.
File metadata
- Download URL: clinlp-0.10.0-py3-none-any.whl
- Upload date:
- Size: 57.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f80fea44d7c415fbd3e76c82a9823bfcb47b8fbb8cdd7299b6dbb7ad7a3387
|
|
| MD5 |
4057dd7fbcf4664d3d4a0881f7635073
|
|
| BLAKE2b-256 |
446f0bad54c434b76df370ce714cc26ab061d159771dc1fb0f47ed1aeba29a47
|