Riksdagsmonitor Intelligence Platform - v0.7.19
    Preparing search index...
    • Generate a content-aware article title derived from the policy domains found in documents.

      Extracts the top 2 policy themes from the provided documents and returns a language-specific title that reflects the actual content. Returns null when fewer than 2 distinct domains can be detected so callers can fall back to their static titles.

      Parameters

      • documents: RawDocument[]

        Source documents to analyse for policy themes

      • lang: string

        Target language code (e.g. 'en', 'sv', 'de')

      • articleType: "committee-reports" | "propositions" | "motions"

        Article type: 'motions' | 'propositions' | 'committee-reports'

      Returns { title: string; subtitle: string }

      Content-based { title, subtitle }, or null when analysis is insufficient