osint-dashboard/news/summerizer
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sirius DevOps d40244900e feat(summarizer): collapse syndicated wire copies before selection
The map phase grades every article, but a single wire story arrives from
many station domains with an identical headline (the measured run selected
12 blocks that were only two stories, then produced a ticker with five
summit rows and one FAA row). Dedupe now runs before the threshold/cap, so
SUMMARY_TOP_N buys distinct stories.

- intel.py: pure `dedupe_blocks(blocks, *, similarity, enabled)` plus
  `normalize_title` / `title_similarity`. Titles are lowercased, punctuation
  flattened and a short digit-free trailing source suffix (" - KCCI",
  " | CNN", " — AP") dropped; blocks match on equal normalised titles or
  word-set Jaccard / word-sequence difflib ratio >= similarity (default
  0.85). Best score wins the group (ties -> earliest), matching is against
  the representative only (no transitive chaining), and differing categories
  or differing numbers never merge. Blocks now carry their article title.
- summarizer.py: dedupe graded blocks before select_graded() and log
  `dedupe 21 -> 9 (kept 9, duplicates 12)`; SUMMARY_DEDUPE=0 skips it,
  SUMMARY_DEDUPE_SIMILARITY tunes it. persist_article_scores() still writes
  one row per graded article, with duplicates selected=false and
  duplicate_of pointing at the surviving article id.
- article_scores.duplicate_of INTEGER NULL in ensure_tables() and alembic
  013 (upgrade/downgrade verified against Postgres 16).
- docs/news.md + .env.example document both knobs.

Replaying the observed summary id=6 (21 graded, 9 distinct titles) now keeps
9 and, at min_score=60/top_n=12, selects 2 — the 11 dropped copies that
scored >= 60 are stored selected=false with a duplicate_of pointer.
2026-11-13 22:14:44 -05:00
..
tests feat(summarizer): collapse syndicated wire copies before selection 2026-11-13 22:14:44 -05:00
.dockerignore Add news pipeline: hourly scraper + Gemini summarizer in compose 2026-08-24 17:28:46 -04:00
Dockerfile feat: 23:00 daily news recap; prompts drop futures 2026-08-28 22:53:31 -04:00
intel.py feat(summarizer): collapse syndicated wire copies before selection 2026-11-13 22:14:44 -05:00
nous_client.py fix(map): geofence delete, vessel snapshots, sentinel cache, news briefs 2026-08-29 20:40:27 -04:00
requirements.txt chore: point news-summarizer compose at Nous portal 2026-08-28 17:06:55 -04:00
run_news_summarizer.py feat: 23:00 daily news recap; prompts drop futures 2026-08-28 22:53:31 -04:00
summarizer.py feat(summarizer): collapse syndicated wire copies before selection 2026-11-13 22:14:44 -05:00