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.

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 CLI, scripts, or services.
  • PII detection & de-identification – HIPAA-compliant smart entity merging for production-ready de-identification.
  • 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, CLI command, 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/analyze_cli.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.

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. PII Detection & Smart Merging for HIPAA-compliant de-identification (v0.5.0).
  6. Batch Processing for multi-text/file processing.
  7. ModelLoader & Pipelines for long-running jobs.
  8. Model Registry to pick the right checkpoint.
  9. Configuration Profiles for dev/prod/test switching.
  10. Advanced NER & Output Formatting to polish spans.
  11. Medical-Aware Tokenizer for better clinical token boundaries.
  12. Configuration & Validation to keep deployments reproducible.
  13. Zero-shot Toolkit when you need GLiNER workflows.
  14. Performance Profiling for timing and optimization.
  15. TUI - Interactive Terminal for visual analysis in the terminal.
  16. CLI & Automation, 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.