Performant and production-ready NLP pipelines for clinical text written in Dutch
Reason this release was yanked:
resources not included in package
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.2.tar.gz
(42.2 kB
view details)
Built Distribution
clinlp-0.9.2-py3-none-any.whl
(45.2 kB
view details)
File details
Details for the file clinlp-0.9.2.tar.gz
.
File metadata
- Download URL: clinlp-0.9.2.tar.gz
- Upload date:
- Size: 42.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d0d41eddde33b61250c277ab5a2a5cb0f864c8e71da4b3aaf4ec01684925a2 |
|
MD5 | dc12ae161e4eebc33bb4c2b62d4f8056 |
|
BLAKE2b-256 | 80ad627139e38f6cae8c11647b3f4567f97977e47c6919d5e4d076e20bec9d71 |
File details
Details for the file clinlp-0.9.2-py3-none-any.whl
.
File metadata
- Download URL: clinlp-0.9.2-py3-none-any.whl
- Upload date:
- Size: 45.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519a74897d5438ba5a102b22abb89e7b6e8d6eb5a7ec0b249c1279c376e79dfa |
|
MD5 | 9e388ad7143208e088a807f83d91bf90 |
|
BLAKE2b-256 | f5820efa9b9d8e19f3dd74722a6ca5ca502782cd9e3c1d50c2ddcdb2ff4ac967 |