/** * Surface strings, tokens, and alignments. */ import { Epidatum } from './epigraph'; import { Graph } from './graph'; import { Triple } from './types'; import { ArrayKeysMap } from './utils'; export interface AlignmentMarkerOptions { prefix?: string; } export declare class AlignmentMarker extends Epidatum { indices: number[]; prefix?: string; /** * `options` consists of the following: * - `prefix`: The prefix of the alignment marker. */ constructor(indices: number[], options?: AlignmentMarkerOptions); /** * Instantiate the alignment marker from its string `s`. * * @param s - The string representation of the alignment marker. * @returns An instance of Alignment or RoleAlignment based on the provided string. * @example * import { Alignment, RoleAlignment } from 'penman-js'; * * Alignment.fromString('1'); * // Alignment([1]) * * RoleAlignment.fromString('e.2,3'); * // RoleAlignment([2, 3], 'e.') */ static fromString(s: string): T; /** @ignore */ __repr__(): string; /** Equivalent to `__repr__` in Python */ pprint(): string; toString(): string; equals(other: AlignmentMarker): boolean; } export declare class Alignment extends AlignmentMarker { mode: number; } export declare class RoleAlignment extends AlignmentMarker { mode: number; } type _Alignments = ArrayKeysMap; /** * Return a mapping of triples to alignments in graph `g`. * * @param g - A `Graph` object containing alignment data. * @returns An object mapping `Triple` objects to their corresponding `Alignment` objects, if any. * @example * import { decode, alignments } from 'penman-js'; * * const g = decode( * `(c / chase-01~4 * :ARG0~5 (d / dog~7) * :ARG0~3 (c / cat~2))` * ); * alignments(g); * // ArrayKeysMap({ * // ['c', ':instance', 'chase-01']: Alignment([4]), * // ['d', ':instance', 'dog']: Alignment([7]), * // ['c', ':instance', 'cat']: Alignment([2]) * // }) */ export declare function alignments(g: Graph): _Alignments; /** * Return a mapping of triples to role alignments in graph `g`. * * @param g - A `Graph` object containing role alignment data. * @returns An object mapping `Triple` objects to their corresponding `RoleAlignment` objects, if any. * @example * import { decode, roleAlignments } from 'penman-js'; * * const g = decode( * `(c / chase-01~4 * :ARG0~5 (d / dog~7) * :ARG0~3 (c / cat~2))` * ); * roleAlignments(g); * // ArrayKeysMap({ * // ['c', ':ARG0', 'd']: RoleAlignment([5]), * // ['c', ':ARG0', 'c']: RoleAlignment([3]) * // }) */ export declare function roleAlignments(g: Graph): _Alignments; export {};