import { Index } from './backtraceGraph.cjs'; import { SubgraphMetadata } from './graphMetadata.cjs'; import './utils.cjs'; /** * Class to represent a graph path. */ declare class Path { src: SubgraphMetadata; refIndex: number; hypIndex: number; lastHypIndex: number; lastRefIndex: number; closedCost: number; openCost: number; atUnambiguousMatchNode: boolean; endIndices: [number, number, number][]; sortId: bigint; constructor(src: SubgraphMetadata); /** * Get the ID of the path used for pruning. */ get pruneId(): number; /** * Get the cost of the path. */ get cost(): number; /** * Get the normalized cost of the path. */ get normCost(): number; /** * Get the current node index of the path. */ get index(): Index; /** * Check if the path has reached the terminal node. */ get atEnd(): boolean; /** * Update the sort ID for path ordering. Ensures identical behavior as C++ implementation. */ updateSortId(t: bigint): void; } /** * Perform beam search to align reference and hypothesis texts for a given source. * * @param src The source metadata for alignment. * @param beamSize The size of the beam for beam search. Defaults to 100. */ declare function errorAlignBeamSearch(src: SubgraphMetadata, beamSize?: number): Path; export { Path, errorAlignBeamSearch };