OpenMed Documentation¶
OpenMed bundles curated biomedical models, advanced extraction utilities, and one-call orchestration so you can ship clinical NLP workflows without wrangling infrastructure. This documentation keeps the most copied snippets and workflows close at hand—each section is Markdown-first, searchable, and optimized for quick scanning or copy/paste into notebooks.
OpenMed 1.0.0 also introduces the new Apple story:
- Python MLX on Apple Silicon Macs through
openmed[mlx] - OpenMedKit for native macOS, iOS, and iPadOS apps
- Shared MLX artifacts so Python and Swift can consume the same packaged model layout
What you get¶
- Curated registries – discoverable Hugging Face models with metadata (domain, size, device guidance).
- One-line orchestration –
analyze_textwraps validation, inference, and formatting for scripts, notebooks, or services. - PII detection & de-identification – HIPAA-compliant smart entity merging for production-ready de-identification.
- Apple Silicon acceleration – MLX-backed Python inference plus Swift-native app integration through
OpenMedKit. - REST service MVP – FastAPI endpoints for
/health,/analyze,/pii/extract, and/pii/deidentify. - Advanced NER post-processing – score-aware grouping, PHI-friendly filtering, and CSV/JSON/HTML export helpers.
- Composable config –
OpenMedConfigreads YAML/ENV so deployments stay reproducible across laptops and clusters.
Copy-friendly defaults
Every page in this site exposes code fences with copy buttons and callouts so teammates (or AI copilots) can lift the exact snippet they need. Use the search shortcut (/ or cmd/ctrl + K) to jump straight to an entity, API call, or API surface.
First look¶
from openmed import analyze_text
result = analyze_text(
"Patient started on imatinib for chronic myeloid leukemia.",
model_name="disease_detection_superclinical",
confidence_threshold=0.55,
)
for entity in result.entities:
print(entity.label, entity.text, entity.confidence)
The rest of the docs expand on this snippet—head to Quick Start for the end-to-end setup, then explore the guides for configuration, zero-shot GLiNER workflows, and advanced processing helpers.
1.0.0 launch highlights¶
- MLX Backend – Python MLX on Apple Silicon, shared artifact packaging, and backend auto-detection.
- OpenMedKit (Swift Package) – native macOS/iOS/iPadOS integration with MLX and CoreML paths.
- CoreML Packaging – current status of the bundled Apple model route alongside the new MLX flow.
- Examples & Copy/Paste Recipes – release-friendly snippets for Python, PII, batch jobs, and Apple runtimes.
How these docs are structured¶
- Quick Start – fastest path to a working environment plus a copy/paste script.
- Feature Map – see how every capability maps back to the code.
- Core guides:
- Analyze Text Helper for single-call inference.
- REST Service (MVP) for Dockerized HTTP endpoints.
- PII Detection & Smart Merging for HIPAA-compliant de-identification (v0.5.0).
- Batch Processing for multi-text/file processing.
- ModelLoader & Pipelines for long-running jobs.
- Model Registry to pick the right checkpoint.
- Configuration Profiles for dev/prod/test switching.
- Advanced NER & Output Formatting to polish spans.
- Medical-Aware Tokenizer for better clinical token boundaries.
- Configuration & Validation to keep deployments reproducible.
- Zero-shot Toolkit when you need GLiNER workflows.
- Performance Profiling for timing and optimization.
- Examples and Testing & QA for day-to-day operations.
- Contributing & Releases – how we cut releases, publish docs, and keep CI green.
Need something that is not here yet? Drop an issue on GitHub and mention the missing recipe. Every addition is just a Markdown file away.