Topic Classification (rule-based)
topic-rulesv0.1Published: 2026-05-22Current versionAssigns one primary and up to 3 secondary topics per vote using keyword rules, concept mappings, and country detection.
Formula
confidence = min(0.98, 0.45 + min(0.4, total_weight × 0.18) + min(0.15, evidence_count × 0.05))Included in the calculation
All votes are eligible. Each topic accepts a vote if its confidence exceeds 0.55.
Excluded from the calculation
Votes with no matching keywords or concept mappings receive no topic. Topics with confidence below the threshold are not stored.
Limitations
Some procedural votes have generic titles ("Amendment 12") that cannot be classified without additional metadata. The rule-based classifier favours precision over recall — it is deliberately conservative.
Implementation: open source under MIT. The calculation logic lives in the project repository under pipelines/.