map-entities

Extract named entities from legal documents and map relationships with spaCy.

6|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/jdrodriguez/legal-toolkit --skill map-entities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: map-entities
Source: https://github.com/jdrodriguez/legal-toolkit/tree/main/legal-toolkit/skills/map-entities
Command: npx skills add https://github.com/jdrodriguez/legal-toolkit --skill map-entities

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires spacy, pandas, networkx, plotly, xlsxwriter, pdfplumber, docx, and includes scripts (resource) components.

What problem does it solve?

Extract named entities from legal documents and map their relationships across files, enabling faster cross-document analysis and insight extraction for legal teams.

Core Features & Use Cases

  • NER-driven extraction: Identifies PERSON, ORG, DATE, MONEY, GPE, LAW and other entities in PDFs, DOCX, TXT, and MD files.
  • Relationship mapping: Builds interactive graphs to show connections between entities across documents.
  • Input flexibility: Accepts a single file or a directory of supported formats; outputs structured metadata and visualizations.

Quick Start

Provide a path to a document or folder of documents to analyze and run the map-entities skill to generate an entity-relationship map.

Frequently Asked Questions about map-entities

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

FAQPage Schema
How do I extract named entities from legal documents and map their relationships across files?

To extract named entities and map relationships across legal documents, process PDFs, DOCX, TXT, or MD files using spaCy NLP to generate a cross-document relationship graph and structured metadata outputs.

Can I analyze a directory of PDFs and DOCX files for cross-document entity extraction?

Yes, cross-document entity extraction supports analyzing either a single file or an entire directory of PDFs, DOCX, TXT, and MD files, producing structured outputs and interactive visualizations for the entire batch.

What types of legal entities can spaCy NLP identify when processing legal texts?

When processing legal texts, spaCy NLP identifies entities including PERSON, ORG, DATE, MONEY, GPE, and LAW, enabling detailed cross-document analysis and relationship mapping between these extracted entity types.

Do I need to install a specific spaCy model for legal entity extraction?

Yes, legal entity extraction requires the spaCy model en_core_web_sm by default, with an option to upgrade to en_core_web_trf for higher accuracy during the NER-driven extraction and relationship mapping process.

What is the best way to visualize connections between organizations and people in legal contracts?

The best way to visualize connections between entities in legal contracts is to generate interactive relationship graphs using NetworkX and Plotly, which map connections between identified entities like ORG and PERSON across documents.

What are the limitations of using default spaCy models for legal document analysis?

The default spaCy model en_core_web_sm provides standard accuracy for legal document analysis, but users can upgrade to the en_core_web_trf transformer model to achieve higher accuracy for complex legal entity extraction.