bridging-presidio-and-spacy

Integrate OpenMed clinical PII detection with Presidio, spaCy, and LangChain workflows.

5.0k|615|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/maziyarpanahi/openmed --skill bridging-presidio-and-spacy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bridging-presidio-and-spacy
Source: https://github.com/maziyarpanahi/openmed/tree/main/skills/bridging-presidio-and-spacy
Command: npx skills add https://github.com/maziyarpanahi/openmed --skill bridging-presidio-and-spacy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers combine OpenMed's on-device clinical PII detection with existing Presidio, spaCy, and LangChain workflows without rewriting their NLP pipelines or importing optional dependencies unnecessarily.

Core Features & Use Cases

  • Lazy Adapter Discovery: Discover and load interoperability adapters through OpenMed's registry while keeping optional framework dependencies isolated.
  • Presidio Integration: Convert between Presidio recognizer results and canonical OpenMed entities, merge overlapping detections, and send OpenMed spans to Presidio anonymizers.
  • spaCy Integration: Add the openmed_deid pipeline component to place aligned PII spans on spaCy documents and optionally merge them into document entities.
  • LangChain Guardrails: Redact PHI from strings, documents, collections, and mapping payloads before they reach downstream language models.
  • Use Case: A healthcare application can combine Presidio recognizers with OpenMed clinical recall, attach the resulting spans to a spaCy document, or redact a LangChain prompt before sending it to a model.

Quick Start

Use the bridging skill to connect OpenMed PII extraction to your Presidio, spaCy, or LangChain pipeline and redact or exchange canonical entities as needed.

Frequently Asked Questions about bridging-presidio-and-spacy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Presidio PII detection with spaCy and LangChain pipelines?

You can integrate Presidio PII detection with spaCy and LangChain by using OpenMed's lazy adapter registry to convert recognizer results into canonical entities, attach spans to spaCy documents, and redact LangChain prompts.

Can I use spaCy to annotate clinical NLP documents with Presidio anonymization results?

Yes, you can add the openmed_deid pipeline component to spaCy to place aligned PII spans on documents and optionally merge them into document entities before sending them to Presidio anonymizers.

What's the best way to redact PHI from LangChain prompts before reaching a language model?

The best way to redact PHI from LangChain prompts is to apply LangChain guardrails that redact sensitive information from strings, documents, collections, and mapping payloads before they reach downstream language models.

Do I need to install optional dependencies to use Presidio and spaCy interoperability adapters?

No, you do not need to import optional dependencies unnecessarily; OpenMed's lazy adapter discovery loads interoperability adapters for Presidio and spaCy while keeping optional framework dependencies isolated.

How does span merging work when combining OpenMed clinical PII detection with Presidio recognizers?

Span merging combines OpenMed clinical PII detection with Presidio recognizers by converting between recognizer results and canonical OpenMed entities, then merging overlapping detections for accurate de-identification.

When should I not use this bridging approach for clinical de-identification?

You should not use this bridging approach if your NLP pipeline requires frameworks outside of Presidio, spaCy, or LangChain, or if you need to rewrite your entire pipeline rather than adapt existing canonical PII entities.