Skip to content
Dark MatterDark Matter
Extension

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

  1. The content script (src/content/index.ts) checks the current URL against all registered adapters
  2. The matching adapter's extractEntities(document) method runs, returning an array of ExtractedEntity objects
  3. Each entity includes: name, type (startup/investor/fund/person), confidence (0–1), source (which selector matched), and optional metadata
  4. The content script sends the entities to the background service worker via chrome.runtime.sendMessage
  5. The side panel calls POST /v1/intelligence/resolve with 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:

  1. Alias lookup — exact match against a curated alias table (e.g., "a16z" → FC:ORG:a16z)
  2. Slug/name match — exact match on entity slug or normalized display name
  3. 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

ConfidenceMatch typeExample
1.00Alias or exact slug"Anduril Industries" → anduril
0.95Exact name match"Anduril Industries, Inc." → anduril
0.75–0.94Fuzzy match"Anduril Indust." → anduril
< 0.75No matchNot 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.

Edit this page on GitHub

Last reviewed: March 23, 2026

Was this page helpful?