Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Build article-specific keywords. Editorial floor (2026-05-24 brief): every page MUST surface the four institutional anchors โ€” Riksdagsmonitor, Riksdag, Regeringen, political intelligence โ€” in the page's own language, then layer story-specific signal on top.

      Ordering (highest signal first):

      1. Brief entities (input.briefEntities) โ€” bill IDs (HD03267), proposition refs (prop. 2025/26:267), committee report IDs (JuU28), committee codes (JuU, SfU), party codes (M, SD), named entities (Sร„PO, Migrationsverket, Tidรถavtalet). Mined upstream by brief-extractor.ts from the executive-brief; universal-Swedish identifiers carry across all 14 locales unchanged.
      2. Localized mandatory floor โ€” LANG_CORE_KEYWORDS[lang] (already includes localized Riksdagsmonitor / parliament / political intelligence) + LANG_GOVERNMENT_KEYWORD[lang] (Regeringen).
      3. Localized article-type label (Propositions โ†’ Lagfรถrslag / Regierungsvorlagen / โ€ฆ). The localized label, not the English articleTypeId slug, so non-EN pages don't leak EN tokens.
      4. Native language name (Svenska, Deutsch, ๆ—ฅๆœฌ่ชž) โ€” surfaces the locale in its own script for multilingual SERP routing.

      Removed (was leakage / boilerplate):

      • formatPublicationUpdateKeyword(date, lang) โ€” "22 maj 2026 uppdatering" is calendar boilerplate, not story signal. The publication date already lives in article:published_time OG meta, the URL slug, and the rendered byline.
      • topicPhrase + wordsFrom(title) + wordsFrom(description) โ€” these were chopping rich H1s ("Sweden Abolishes Permanent Residence โ€ฆ") into junk single-word tokens (Sweden, Abolishes, Permanent). Brief entities carry the same semantic ground without prose fragmentation.
      • Canonical-path slug parts and English Language-Meta name โ€” both leaked EN tokens into non-EN keyword strings.
      • EN frontmatter keywords: seed โ€” historically mixed in via the aggregator's buildArticleKeywords upstream call, which itself used this function. Now seeded purely via briefEntities to keep the pipeline single-source-of-truth.

      The English path still accepts the input.keywords seed (the EN frontmatter line) for backward-compat with EN-only tests, but it is appended AFTER brief entities and the mandatory floor, so the deterministic high-signal tokens always lead.

      Parameters

      Returns string