/** * Fuzzy match against the sanctions DB. * * Scoring strategy (0-100): * - Exact ID match (passport, IČO, tax_id) → 100, matched_on='id' * - Token-set Jaccard with edit-distance fallback for misspellings * - Best score across primary_name + aliases * - Optional DOB / nationality filters reduce false positives * * Designed for batches < 1000 candidates (DB pre-filter does the heavy lifting). */ import { SanctionsDb } from './db.js'; import type { MatchResult } from './types.js'; export interface SearchOptions { threshold?: number; limit?: number; typeFilter?: 'person' | 'entity'; } export declare class SanctionsSearch { private readonly db; constructor(db: SanctionsDb); searchByName(rawName: string, opts?: SearchOptions & { dob?: string; nationality?: string; }): MatchResult[]; /** Look up a CZ company by IČO. Tries exact-id table then name search via ARES (caller-supplied name). */ searchByIco(ico: string, fallbackName?: string): MatchResult[]; /** Look up a person by passport / national ID etc. */ searchByDocument(type: string, value: string): MatchResult[]; } /** * Token-set ratio (industry standard for fuzzy name matching, e.g. FuzzyWuzzy). * * Splits both names into token sets, isolates the intersection, then takes * max(intersection vs full-a, intersection vs full-b, full-a vs full-b). * Effect: * - "Bank" vs "Bank Rossiya" → 100 (subset of tokens matches fully) * - "John Smyth" vs "John Smith" → ~90 (typo tolerated) * - "Smith, John" vs "John Smith" → 100 (token order ignored) * - "Jane Doe" vs "Vladimir Putin" → low (no overlap) * * Sanctions screening intentionally favors recall (false positives reviewed, * false negatives missed = compliance breach). */ export declare function nameSimilarity(a: string, b: string): number; //# sourceMappingURL=search.d.ts.map