Skip to content

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 orchestrationanalyze_text wraps 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 configOpenMedConfig reads 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)
uv pip install "openmed[hf]"
uv run python examples/pii_model_comparison.py

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

How these docs are structured

  1. Quick Start – fastest path to a working environment plus a copy/paste script.
  2. Feature Map – see how every capability maps back to the code.
  3. Core guides:
  4. Analyze Text Helper for single-call inference.
  5. REST Service (MVP) for Dockerized HTTP endpoints.
  6. PII Detection & Smart Merging for HIPAA-compliant de-identification (v0.5.0).
  7. Batch Processing for multi-text/file processing.
  8. ModelLoader & Pipelines for long-running jobs.
  9. Model Registry to pick the right checkpoint.
  10. Configuration Profiles for dev/prod/test switching.
  11. Advanced NER & Output Formatting to polish spans.
  12. Medical-Aware Tokenizer for better clinical token boundaries.
  13. Configuration & Validation to keep deployments reproducible.
  14. Zero-shot Toolkit when you need GLiNER workflows.
  15. Performance Profiling for timing and optimization.
  16. Examples and Testing & QA for day-to-day operations.
  17. 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.