Entity Extraction
How the DMTR extension detects and resolves entities from page content using the SiteAdapter pattern.
Overview
Entity extraction is how the extension detects companies, investors, and people from page content. Each supported site has a SiteAdapter — a declarative module that knows how to parse entities from that site's DOM structure. The adapter runs in a content script, extracts entities, and sends them to the service worker for resolution against the DMTR intelligence database.
How it works
- The content script (
src/content/index.ts) checks the current URL against all registered adapters - The matching adapter's
extractEntities(document)method runs, returning an array ofExtractedEntityobjects - Each entity includes:
name,type(startup/investor/fund/person),confidence(0–1),source(which selector matched), and optionalmetadata - The content script sends the entities to the background service worker via
chrome.runtime.sendMessage - The side panel calls
POST /v1/intelligence/resolvewith the entity name to match it against the Blackmoat corpus
SiteAdapter interface
interface SiteAdapter {
name: string;
patterns: Array<{ hostname: string; pathname?: string }>;
extractEntities(doc: Document): ExtractedEntity[];
injectionPoints(doc: Document): InjectionPoint[];
}
interface ExtractedEntity {
name: string;
type?: "startup" | "investor" | "fund" | "person";
confidence: number;
source: string;
metadata?: Record<string, unknown>;
}Entity resolution
Extracted names are resolved to canonical Blackmoat entities via the /v1/intelligence/resolve endpoint. The resolver uses three strategies in order:
- Alias lookup — exact match against a curated alias table (e.g., "a16z" →
FC:ORG:a16z) - Slug/name match — exact match on entity slug or normalized display name
- Fuzzy match — Levenshtein distance with configurable threshold (default 0.75)
Each match returns a confidence score. The side panel uses the highest-confidence match.
Confidence scoring
| Confidence | Match type | Example |
|---|---|---|
| 1.00 | Alias or exact slug | "Anduril Industries" → anduril |
| 0.95 | Exact name match | "Anduril Industries, Inc." → anduril |
| 0.75–0.94 | Fuzzy match | "Anduril Indust." → anduril |
| < 0.75 | No match | Not displayed |
Current adapters
- PitchBook — extracts company name from profile headers, investor names from deal tables. See PitchBook.
Bloomberg, AlphaSense, Carta, and custom site adapters are planned but not yet implemented.