entity-linking-wikidata-local

Links manuscript entities to Wikidata QIDs using a local SQLite index without API calls.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill entity-linking-wikidata-local-ryanzucchi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: entity-linking-wikidata-local
Source: https://github.com/Ryanzucchi/Eldritch_Lich/tree/main/.agents/skills/entity-linking-wikidata-local
Command: npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill entity-linking-wikidata-local-ryanzucchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Authors writing historical or geographically grounded fiction need to verify real-world references without sending private manuscripts to cloud APIs. This Skill resolves entity mentions to Wikidata identifiers entirely offline while keeping fictional characters and places in a separate local ontology. ## Core Features & Use Cases - Local Entity Linking: Matches extracted entities against a local Wikidata SQLite/DuckDB index and resolves ambiguity with cosine similarity over local embeddings (FastText or BERTimbau). - Fiction Filtering: Compares NER output against the novel's own character and location database so fictional entities are never mislinked to real-world QIDs. - Dynamic Fictional Ontology: Builds and maintains an in-memory graph of the author's invented characters and places alongside factual annotations. - Use Case: A novelist writes "Dom Pedro II viajou para Paris" and the Skill returns Paris with QID Q90 at 0.94 confidence, while a fictional character named "Júlio César" is kept in the local fiction graph instead of being linked to the Roman emperor. ## Quick Start Link the entities extracted from my current manuscript chapter to Wikidata entries using the local index and flag any fictional characters separately.

Frequently Asked Questions about entity-linking-wikidata-local

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

FAQPage Schema
How do I link entities to Wikidata without using an API?▼

Use a local Wikidata dump indexed in SQLite or DuckDB and query it directly for candidate QIDs, aliases, and descriptions. Disambiguation happens locally by computing cosine similarity between the paragraph's embedding vector and each candidate's description.

How does entity linking disambiguation work with embeddings?▼

The context vector of the surrounding paragraph (a three-paragraph window) is compared via cosine similarity against each candidate entity's description. The candidate with the highest score above a configurable threshold (default 0.75) is selected.

Can entity linking distinguish fictional characters from real people?▼

Yes, by first matching extracted entities against the novel's own database of characters and locations. High-confidence matches are classified as fiction and stored in a local ontology, skipping the Wikidata lookup entirely.

What are the limitations of a local Wikidata index?▼

A compressed local dump may have limited coverage of niche historical entities and can require over 2 GB of disk space. A fallback is a static dictionary of common cities and countries, treating unmatched terms as fictional entities.

Why does entity linking fail on ambiguous names like Paris?▼

Ambiguous mentions fail when the context similarity score is too low to separate homonyms, such as Paris the city versus Paris the mythological hero. Setting a minimum similarity threshold and discarding links below 0.60 prevents incorrect associations.