Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Detect a paragraph whose content is dominated by a comma-separated list of Title-Case proper nouns (a names list / entity roster) with very little prose connective tissue. Such paragraphs leak into the <meta description> as reader-hostile rosters like "Sigge Sigfridsson, Anna Andersson, Eva Pettersson, Lars Larsson, โ€ฆ" when they happen to be the first paragraph after the H1 + admin byline. Skip them in readFirstParagraph so the description falls through to a real prose paragraph.

      Heuristic โ€” high precision over recall:

      • 3+ comma-separated segments;
      • โ‰ฅ 70 % of segments are short (โ‰ค 35 chars), Title-Case (/^\p{Lu}/u), and contain no sentence terminator;
      • paragraph contains no question mark / exclamation mark / sentence terminator before its last 8 chars (real prose has at least one).

      The threshold tolerates lists that include 1-2 prose connectives like โ€ฆ Andersson (S), Pettersson (M), and Sigfridsson (KD) โ€ฆ while still rejecting bare roster paragraphs. Pure function โ€” exported for tests.

      Parameters

      • text: string

      Returns boolean