medspaCy
Python library of clinical NLP and text processing components built on the spaCy framework.
At a Glance
medspacy is a clinical NLP library for spaCy released under the MIT License; free to use, copy, modify and distribute. Currently in beta.
Engagement
Available On
Alternatives
Listed Oct 2026
About medspaCy
medspaCy is an open-source Python library from the medspacy organization that adds clinical text processing tools to spaCy pipelines. It covers sentence segmentation, concept extraction, contextual analysis, and section detection. The project's README describes it as currently in beta, with version 1.3.1 released on 2024-11-21.
What It Is
medspaCy bundles several modular packages for working with clinical text, each usable on its own or as part of a spaCy pipeline. Users load a default clinical pipeline with medspacy.load(), or wrap an existing spaCy model, and then add rules to extract concepts.
Components and Workflow
The modules cover preprocessing of clinical text, clinical sentence splitting, rule-based named entity extraction with target rules, and an implementation of the ConText algorithm for detecting negation, uncertainty and other entity attributes. Further modules handle section detection, postprocessing of extracted entities, I/O to structured data and databases, and visualization of extracted entities. SpacyQuickUMLS, based on a fork of QuickUMLS, provides UMLS concept extraction.
Language Support
Since May 2024, rules and resources can be distributed in languages other than English. English has ConText rules, section rules, and a QuickUMLS sample. French and Dutch have ConText rules, and several other languages have only limited resources or none, according to the README.
Recent Release
Version 1.3.1 batches database writes of concepts into SQLite, supports spaCy up to 3.8.2, drops Python 3.6 and 3.7 support, and optionally adds sentence boundaries to section headers.
Community Discussions
Be the first to start a conversation about medspaCy
Share your experience with medspaCy, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
medspacy is a clinical NLP library for spaCy released under the MIT License; free to use, copy, modify and distribute. Currently in beta.
- MIT License
- Modular clinical NLP components: preprocess, sentence_splitter, ner, context, section_detection, postprocess, io, visualization
- Install via pip install medspacy
- Self-hosted Python library
Capabilities
Key Features
- Clinical sentence segmentation
- Rule-based concept extraction with target rules
- ConText algorithm for negation and uncertainty detection
- Clinical section detection
- Preprocessing and postprocessing of clinical text and entities
- Database I/O and conversion to structured data
- Entity visualization
- UMLS concept extraction via SpacyQuickUMLS
- Multi-language rule support
