Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...

    Variable ENGLISH_DENSITY_THRESHOLDConst

    ENGLISH_DENSITY_THRESHOLD: 0.05

    Per-language English-marker density threshold. A brief fails when the measured density exceeds this value AND the absolute count exceeds MIN_ENGLISH_MARKERS.

    Three per-script buckets, mirroring the per-language SERP budgets in seo/serp-budgets.ts:

    • Latin (sv/da/no/fi/de/fr/es/nl): 5 % โ€” mirrors SWEDISH_DENSITY_THRESHOLD in check-analysis-language.ts.
    • RTL (ar/he): 2 % โ€” RTL prose tokenises into the empty Latin word stream (Arabic / Hebrew script characters are non-Latin), so any Latin English marker is a strong signal of leaked English. The lower floor catches even a single untranslated sentence in what should otherwise be a near-zero Latin-word brief.
    • CJK (ja/ko/zh): 3 % โ€” legitimate English loanwords are rarer in CJK prose than in Latin scripts, so a single untranslated paragraph stands out at lower density.