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

    Function validateArticleContent

    • Validate the quality of a generated article.

      Checks performed:

      • Minimum word count threshold for the given article type
      • Presence of un-replaced placeholder/template markers
      • Existence of required structural HTML elements
      • Language attribute consistency (lang and dir)
      • Read-time accuracy (computed vs claimed)
      • Meta tag synchronization (title/OG/Twitter alignment)
      • Keyword localization for non-English articles

      Parameters

      • html: string

        Complete HTML string of the generated article

      • language: string

        Language code of the article (e.g. "en", "de", "ar")

      • articleType: string

        Article category string (e.g. "week-ahead")

      Returns ContentValidationResult

      Structured validation result with errors, warnings and metrics