Riksdagsmonitor Intelligence Platform โ€” API Documentation - v0.8.54
    Preparing search index...
    • Validate the quality of a generated article HTML.

      Performs two sequential assessments:

      1. Structural scoring (0โ€“100): word count (0โ€“50), h2 sections (0โ€“30), translation completeness (0โ€“20). Used as the primary pass/fail gate against QUALITY_THRESHOLD.

      2. Multi-dimensional assessment via assessArticleQuality(), which internally runs its own two passes (dimension computation + aggregation), producing a 6-dimension weighted score, issue list, and suggestions.

      Total: 3 assessment passes โ€” 1 structural + 2 multi-dimensional.

      Parameters

      • html: string

        raw HTML of the article

      • lang: string

        language code of the article (e.g. "en")

      • articleType: string

        article type slug (e.g. "motions")

      • filename: string

        filename for the quality record

      • sourceDocIds: readonly string[] = []

        optional list of source document IDs for factual-accuracy check

      Returns ArticleQualityScore

      ArticleQualityScore with metrics, pass/fail, and multidimensional assessment