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.1.tar.gz
(41.9 kB
view details)
Built Distribution
clinlp-0.9.1-py3-none-any.whl
(45.1 kB
view details)
File details
Details for the file clinlp-0.9.1.tar.gz
.
File metadata
- Download URL: clinlp-0.9.1.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.25
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ca83a2f6b8ebfc4caa8e420a04570bd3f6682f2ac2dd63c06d2547e48669887 |
|
MD5 | ebc85973527317c519f2d81b18590765 |
|
BLAKE2b-256 | 9021923cd27ff4a38f37d4c40458cf210f7cf005ae196daf05de8267bcdb5372 |
File details
Details for the file clinlp-0.9.1-py3-none-any.whl
.
File metadata
- Download URL: clinlp-0.9.1-py3-none-any.whl
- Upload date:
- Size: 45.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.25
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5b0db4852d999fac029e734ddd43c478b0f89365806bb35f23dcf829435a42a |
|
MD5 | 0cb9d2351bdfbe5ab0483491fc8e44ef |
|
BLAKE2b-256 | 0872bf8b0e3b459e869ef1891cba57f9b8df2d74ca63cf1c4b6976a21aec65e5 |