Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Return true when the . at text[dotIndex] is the trailing dot of a known abbreviation rather than a real sentence terminator.

      Looks back from the dot position to the first whitespace boundary, collecting the full preceding token โ€” including any internal dots. This allows multi-dot abbreviations like e.g., i.e., U.S., bl.a., d.v.s. to be detected in addition to simple ones like prop. and Mr.

      Normalisation strategy (applied in order):

      1. Lower-case the full token and strip all internal dots; look up the dotless form (e.g โ†’ eg, d.v.s โ†’ dvs). This covers most multi-dot abbreviations whose canonical form is in the set.
      2. If the dotless form is not in the set but the token contains internal dots, check the first dot-split component (bl.a. โ†’ bl). Only the first component is checked to prevent a non-abbreviation prefix from accidentally matching a set member that appears later in the token (e.g. example.al. must not be treated as an abbreviation even though al is in the set).

      Pure function โ€” exported only for testability.

      Parameters

      • text: string
      • dotIndex: number

      Returns boolean