import { EntityMention } from './types.js';
import './index-1qIcnbG1.js';

/**
 * De-linearization transform (SimpleMem-inspired).
 *
 * Converts extracted memories from context-dependent to context-independent
 * by resolving coreferences and anchoring temporal expressions.
 */

/**
 * Replace pronouns with entity names when there's exactly one
 * matching entity of the right type (unambiguous resolution).
 *
 * Possessive pronouns (his/her/its/their) become "entity's".
 * No verb agreement is attempted — it's too fragile with adverbs/modals.
 *
 * Guards against:
 * - Multiple pronouns of the same entity type → skip all (ambiguous referent)
 * - Entity names containing pronoun substrings → placeholder-based two-pass
 * - Entity names containing $ → escaped before replacement
 */
declare function resolveCoReferences(fact: string, entities: EntityMention[]): string;
/**
 * Replace relative temporal expressions with absolute ISO-8601 dates.
 */
declare function anchorTemporalExpressions(fact: string, now: Date): string;
/**
 * Full de-linearization pipeline: temporal anchoring first, then coreference.
 * Order matters: entity names may contain temporal words (e.g., "project-tomorrow")
 * which would be corrupted if temporal anchoring ran after coreference insertion.
 */
declare function delinearize(factContent: string, entities: EntityMention[], timestamp: Date): string;

export { anchorTemporalExpressions, delinearize, resolveCoReferences };
