edsnlp

raw JSON →
0.21.0 verified Mon Apr 27 auth: no python

edsnlp is a modular, fast NLP framework compatible with PyTorch and spaCy, offering tailored support for French clinical notes. Current version 0.21.0, requires Python >=3.10. Release cadence: frequent, minor releases monthly.

pip install edsnlp
error ValueError: [E002] Can't find factory for 'eds.normalizer'
cause The 'eds.normalizer' component is not registered. The edsnlp pipeline components are not automatically loaded.
fix
Ensure you have called 'import edsnlp' and that your edsnlp version includes the component.
error ModuleNotFoundError: No module named 'edsnlp.pipelines'
cause Import path changed: edsnlp.pipelines no longer exists in edsnlp 0.21.0.
fix
Use 'from edsnlp import EDSPipeline' instead of 'from edsnlp.pipelines import EDSPipeline'.
breaking In edsnlp 0.21.0, the API for adding custom pipelines changed. Use nlp.add_pipe() instead of manual pipeline construction.
fix Replace custom pipeline code with nlp.add_pipe().
deprecated The 'eds' language identifier may be deprecated in future versions. Consider using 'edsnlp' as the language ID.
fix Use nlp = edsnlp.load('edsnlp') instead of edsnlp.blank('eds').
gotcha The edsparse parser requires spaCy version 3.6 or higher. Incompatibility may cause silent failures.
fix Upgrade spaCy: pip install spacy>=3.6.

Create a blank French clinical pipeline, add the normalizer, and process a sample sentence.

import edsnlp

nlp = edsnlp.blank("eds")
nlp.add_pipe("eds.normalizer")
doc = nlp("Le patient a été admis pour une douleur thoracique.")
print(doc.ents)