/**
 * Heading Level Normalizer for Section-Aware Chunking
 *
 * Fixes inconsistent heading levels from Datalab OCR by detecting
 * repeating heading patterns (e.g., "ARTICLE N") and normalizing
 * their heading levels to the mode (most common) level within each group.
 *
 * @module services/chunking/heading-normalizer
 */
import { MarkdownBlock } from './markdown-parser.js';
/** Configuration for heading normalization */
export interface HeadingNormalizationConfig {
    /** Enable heading normalization (default: false) */
    enabled: boolean;
    /** Minimum pattern group size to trigger normalization (default: 3) */
    minPatternCount?: number;
}
/**
 * Normalize heading levels in-place for consistent section hierarchy.
 *
 * Groups headings by structural patterns (ARTICLE N, Section N.N, etc.),
 * then normalizes each group to use the mode heading level. This fixes
 * Datalab OCR inconsistencies where identical structural headings get
 * assigned different levels (e.g., ARTICLE 1 as H1 but ARTICLE 5 as H3).
 *
 * Only mutates `block.headingLevel` - never modifies `block.text`.
 *
 * @param blocks - Parsed markdown blocks (mutated in-place)
 * @param config - Normalization configuration
 * @returns The same blocks array (for chaining convenience)
 */
export declare function normalizeHeadingLevels(blocks: MarkdownBlock[], config: HeadingNormalizationConfig): MarkdownBlock[];
//# sourceMappingURL=heading-normalizer.d.ts.map