EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Module Aggregator/Metadata/HeadingRules

    Heading-classification helpers used by the article metadata resolver. Owns:

    • isGenericHeading — the resolver's master generic-heading predicate (drives title-tier selection).
    • Internal helpers for institutional-noun, category-noun, and <label><sep><date> boilerplate detection.

    The editorial-lede whitelist, artifact-category prefix list, and the isArtifactCategoryHeading / stripArtifactCategoryAffix helpers were extracted to ./artifact-category-heading.ts in May 2026 to keep this file under the 600-raw-line drift-guard. They are re-exported here so existing call sites (lede-extractor.ts, artifact-walker.ts, article-metadata.ts) keep working unchanged.

    Pure leaf module. The only runtime dependencies are humanizeSlug (slug) and the helpers re-exported from ./artifact-category-heading.js.

    Functions

    isGenericHeading
    normaliseHeadingText → normaliseHeadingText
    isLedeHeadingMatch → isLedeHeadingMatch
    isArtifactCategoryHeading → isArtifactCategoryHeading
    stripArtifactCategoryAffix → stripArtifactCategoryAffix

    Variables

    EDITORIAL_LEDE_HEADINGS → EDITORIAL_LEDE_HEADINGS
    ARTIFACT_CATEGORY_PREFIXES → ARTIFACT_CATEGORY_PREFIXES