/** * PRI-917 Slice 1 — deterministic shortlist scoring (pure, no LLM, no I/O). * * Why a hand-rolled tokenizer: the Principle corpus is Chinese prose, so * whitespace tokenization collapses a sentence into one useless token. * This module therefore emits CJK character bigrams plus lower-cased latin / * numeric word runs. The result is deterministic, dependency-free, and * explainable — every score decomposes into named shared terms. * * Explicit non-goals (SPEC §6): no embedding, no vector store, no semantic * search service, no background process, no clock, no randomness. */ import type { ReuseCandidate, ReuseCandidateInput, ReusablePrinciple, ReuseShortlist, ReuseShortlistOptions } from './reuse-domain.js'; /** * Deterministic, dependency-free tokenizer. * * - latin / numeric runs → lower-cased word tokens (length >= 2) * - CJK runs → character bigrams (single char when the run is length 1) * - everything else is a separator * * The output is sorted, so two equal texts always tokenize identically. */ export declare function tokenizeForReuse(input: string): string[]; /** * Score one existing Principle against the candidate. * * Returns `null` when no field pair shares anything — an entry with no * evidence is not a proposal. */ export declare function scoreReuseCandidate(input: ReuseCandidateInput, principle: ReusablePrinciple, maxEvidenceTerms?: number): ReuseCandidate | null; /** * Build a deterministic, bounded shortlist of existing Principles that may * already cover the candidate. * * Pure: no I/O, no clock, no randomness. Total order is `score` desc then * `principleId` asc, so identical input always yields identical output * regardless of ledger insertion order. */ export declare function selectReuseShortlist(input: ReuseCandidateInput, principles: readonly ReusablePrinciple[], options?: ReuseShortlistOptions): ReuseShortlist; //# sourceMappingURL=reuse-shortlist.d.ts.map