EU Parliament Monitor - API Documentation - v0.7.19
    Preparing search index...

    Function generateCrossReferences

    • Auto-generate ArticleCrossReference objects for an article based on topic and actor overlap with existing index entries.

      Strength is determined by total overlap (topics + actors):

      • ≥3 shared items → strong
      • 2 shared items → moderate
      • 1 shared item → weak

      Relationship is determined by date comparison:

      • Target article is older (date < entry.date) → follows_up
      • Target article is newer (date > entry.date) → preceded_by
      • Target article has the same date → related

      Parameters

      Returns ArticleCrossReference[]

      Array of auto-generated cross-references (excludes self-references)