bridging-presidio-and-spacy
Combine OpenMed clinical NLP with Microsoft Presidio, spaCy, or LangChain through OpenMed's built-in interop adapter registry (openmed.interop). Covers the lazy adapter registry (available_adapters, get_adapter, adapter_spec), the presidio/spacy/langchain pip extras, and the verified callables — Presidio to_canonical/from_canonical/merge_with_openmed, the spaCy openmed_deid pipeline factory, and the LangChain create_redaction_runnable. Use when the user wants to add Presidio recognizers, embed OpenMed PII detection in a spaCy pipeline, or use OpenMed de-identification as a LangChain runnable.
npx skills add maziyarpanahi/openmed --skill bridging-presidio-and-spacy --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Bridging Presidio, spaCy & LangChain OpenMed interoperates with the dominant PII/NLP ecosystems through a single, **lazy** adapter registry: `openmed.interop`. Adapters live behind explicit imports, so importing `openmed` never drags in Presidio, spaCy, or LangChain — each is an optional extra you install only when you need that bridge. ## When to use Reach for a bridge when: - you already run **Microsoft Presidio** and want OpenMed's clinical PII recall on top (or to feed OpenMed spans back into Presidio's anonymizer); - you have a **spaCy** pipeline and want OpenMed PII spans on the `Doc`; - you build **LangChain** chains and want to redact PHI *before* text reaches an LLM (the on-device guardrail in front of a cloud model); - you need OpenMed's de-identification reachable from an existing framework instead of rewriting the pipeline around `openmed.deidentify`. ## The lazy adapter registry (verified) ```python import openmed.interop as interop interop.available_adapters() # ('cda', 'hl7v2', 'langchain', 'presidio', 'spacy') spec = interop.adapter_spec("presidio") # AdapterSpec(name='presidio', module='openmed.interop.presidio', # extra='presidio', description='Presidio Recogniz
- When to use
- The lazy adapter registry (verified)
- Presidio bridge (verified callables)
- spaCy bridge (verified factory)
- LangChain bridge (verified runnable)
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
pip install "openmed[presidio]" # Presidio RecognizerResult adapter pip install "openmed[spacy]" # spaCy openmed_deid component pip install "openmed[langchain]" # LangChain redaction runnable cda and hl7v2 adapters ship in core (no extra) — see their own skills
What does the bridging-presidio-and-spacy skill do?
Combine OpenMed clinical NLP with Microsoft Presidio, spaCy, or LangChain through OpenMed's built-in interop adapter registry (openmed.interop). Covers the lazy adapter registry (available_adapters, get_adapter, adapter_spec), the presidio/spacy/langchain pip extras, and the verified callables — Presidio to_canonical/from_canonical/merge_with_openmed, the spaCy openmed_deid pipeline factory, and the LangChain create_redaction_runnable. Use when the user wants to add Presidio recognizers, embed OpenMed PII detection in a spaCy pipeline, or use OpenMed de-identification as a LangChain runnable.
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill bridging-presidio-and-spacy --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.