/** * The golden row fields that the relabeler reads. * Other fields are copied unchanged. */ export interface GoldenStreetRow { raw: string; components: Record; country?: string; source?: string; notes?: string; [key: string]: unknown; } /** * The relabel result class for one row. */ export type GoldenRelabelClass = "split-suffix" | "split-suffix-postdirectional" | "split-prefix-only" | "already-split" | "single-token" | "suffix-only-street" | "postdirectional-tail-only" | "no-suffix-match" | "no-street" | "not-us" | "untrimmed-street"; /** * A review note attached to a changed row. * The relabel decision ignores it. */ export interface GoldenRelabelFlag { kind: "name-prone-suffix" | "venue-context" | "remainder-is-affix"; detail: string; } /** * The relabel result for one row. */ export interface GoldenRelabelResult { /** * The row to write. * This is the input object itself when no field changed. */ row: GoldenStreetRow; changed: boolean; rowClass: GoldenRelabelClass; flags: GoldenRelabelFlag[]; prefixSplit: boolean; /** * The original street span of a changed row, for review. */ beforeStreet?: string; } /** * Options for {@linkcode relabelGoldenStreetRow}. */ export interface RelabelStreetRowOptions { /** * Whether to also move a leading directional into `street_prefix`. * * Without it `N Desmet Avenue` grades as `street: "N Desmet"` against a model that emits a prefix. * * @defaultValue `true` */ splitPrefix?: boolean; } /** * Splits the street span of one US golden row without mutating its argument, * returning it when no field changes. * * @throws When the split spans do not rebuild the original street byte for byte. */ export declare function relabelGoldenStreetRow(row: GoldenStreetRow, options?: RelabelStreetRowOptions): GoldenRelabelResult; //# sourceMappingURL=row.d.ts.map