Commit graph

7 Commits

Autor SHA1 Nachricht Datum
Claude Dev
19da099583 feat: Kontextabhängige Karten-Kategorien
4 feste Farbstufen (primary/secondary/tertiary/mentioned) mit
variablen Labels pro Lage, die von Haiku generiert werden.

- DB: category_labels Spalte in incidents, alte Kategorien migriert
  (target->primary, response/retaliation->secondary, actor->tertiary)
- Geoparsing: generate_category_labels() + neuer Prompt mit neuen Keys
- QC: Kategorieprüfung auf neue Keys umgestellt
- Orchestrator: Tuple-Rückgabe + Labels in DB speichern
- API: category_labels im Locations- und Lagebild-Response
- Frontend: Dynamische Legende aus API-Labels mit Fallback-Defaults
- Migrationsskript für bestehende Lagen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 15:04:02 +01:00
claude-dev
606c60a815 Geoparsing: Laender vor Staedten pruefen, Alias-Tabelle
Behebt falsche Geocodierung bei Laendernamen die auch als Staedte
existieren (Lebanon->US statt Libanon, Jordan->HK statt Jordanien).

- Laender-Aliase (50+ deutsch/englisch) werden zuerst geprueft
- geonamescache Laendersuche vor Staedtesuche
- Stadtsuche in eigene _geocode_city() Funktion extrahiert
- Bestehende falsche Marker in DB korrigiert

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:39:45 +01:00
claude-dev
29dc457ceb Fix: NoneType.upper() Fehler bei country_code=None im Geoparsing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:21:00 +01:00
claude-dev
5ae61a1379 Geoparsing von spaCy auf Haiku umgestellt
- geoparsing.py: Komplett-Rewrite (spaCy NER + Nominatim -> Haiku + geonamescache)
- orchestrator.py: incident_context an geoparse_articles, category in INSERT
- incidents.py: incident_context aus DB laden und an Geoparsing uebergeben
- public_api.py: Locations aggregiert im Lagebild-Endpoint
- components.js: response-Kategorie neben retaliation (beide akzeptiert)
- requirements.txt: spaCy und geopy entfernt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:00:40 +01:00
claude-dev
7e600184e8 Geoparsing: Nominatim-Plausibilitätsprüfung + regionale Stopwords
- SequenceMatcher prüft ob Nominatim-Ergebnis zum Suchbegriff passt (Schwelle 0.3)
- Verwirft Fehlzuordnungen wie 'Golf-Staaten' -> Uganda
- Regionale/vage Begriffe als Stopwords (Naher Osten, Golf-Staaten, Balkan etc.)
- Falscher DB-Eintrag (Botschafter-Residenz Uganda) bereinigt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:00:01 +01:00
claude-dev
6112cd5882 Fix: geonamescache alternatenames kann Liste statt String sein
- alternatenames-Feld wird jetzt sowohl als list als auch als str behandelt
- Behebt 'list' object has no attribute 'split' Fehler beim Geoparsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:36:28 +01:00
claude-dev
4bfc626067 Kartenfeature: Geoparsing + Leaflet-Karte im Dashboard
- Neues Geoparsing-Modul (spaCy NER + geonamescache/Nominatim)
- article_locations-Tabelle mit Migration
- Pipeline-Integration nach Artikel-Speicherung
- API-Endpunkt GET /incidents/{id}/locations
- Leaflet.js + MarkerCluster im Dashboard-Grid
- Theme-aware Kartenkacheln (CartoDB dark / OSM light)
- Gold-Akzent MarkerCluster, Popup mit Artikelliste

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:04:07 +01:00