feat(svd): update 8 of 10 axis labels derived from motion content

Revise SVD_THEMES labels based on TF-IDF analysis of top 50 motions
per component (pool size: current_parliament). Manual review of motion
titles ensures labels reflect actual parliamentary content rather than
party position semantics.

Key corrections:
- Axis 1: fiscal/economic policy vs social welfare + international rights
- Axis 4: active international engagement vs restraint
- Axis 5: pragmatic financial support vs progressive individual rights
- Axis 6: fossil fuels/financial incentives vs climate/intl rights
- Axis 7: practical-administrative vs idealistico-procedural (kept)
- Axis 8: European defense cooperation vs domestic socioeconomic policy
- Axis 9: concrete-administrative vs systemic reform
- Axis 10: citizen protection vs government regulation

Subagent analysis caught that axes 5 and 6 are NOT the same
(Nationale soevereiniteit) — manual motion review confirms distinct
content for each. Axes 1, 5, 6 had completely wrong labels.

Refs: thoughts/explorer/svd_label_review.md
See also: docs/brainstorms/2026-04-13-topic-derived-svd-labels-requirements.md
This commit is contained in:
2026-04-13 23:59:50 +02:00
parent 3a6710091a
commit cf549dcc1c
8 changed files with 1030 additions and 89 deletions
+7 -13
View File
@@ -10,11 +10,9 @@ def test_display_label_for_modal():
y_label = axis_classifier.display_label_for_modal(None, "y")
# Should return component 1 and 2 labels from SVD_THEMES
# SVD_THEMES[0] = "Economische sectorbelangen versus sociale welvaart"
# SVD_THEMES[1] = "Nationalistische versus multilateralistische oriëntatie"
assert (
"Economische sectorbelangen" in x_label or "sectorbelangen" in x_label.lower()
)
# SVD_THEMES[1] = "Fiscaal-economisch beleid versus sociaal welzijn en internationale rechten"
# SVD_THEMES[2] = "Nationalistische versus multilateralistische oriëntatie"
assert "Fiscaal-economisch" in x_label or "fiscaal-economisch" in x_label.lower()
assert "Nationalistisch" in y_label or "nationalistisch" in y_label.lower()
@@ -24,9 +22,7 @@ def test_display_label_for_modal_maps_as_labels():
y_label = axis_classifier.display_label_for_modal("As 2", "y")
# Should return component 1 and 2 labels from SVD_THEMES
assert (
"Economische sectorbelangen" in x_label or "sectorbelangen" in x_label.lower()
)
assert "Fiscaal-economisch" in x_label or "fiscaal-economisch" in x_label.lower()
assert "Nationalistisch" in y_label or "nationalistisch" in y_label.lower()
@@ -36,9 +32,7 @@ def test_display_label_for_modal_stempatroon():
y_label = axis_classifier.display_label_for_modal("Stempatroon As 2", "y")
# Should return component 1 and 2 labels from SVD_THEMES
assert (
"Economische sectorbelangen" in x_label or "sectorbelangen" in x_label.lower()
)
assert "Fiscaal-economisch" in x_label or "fiscaal-economisch" in x_label.lower()
assert "Nationalistisch" in y_label or "nationalistisch" in y_label.lower()
@@ -92,8 +86,8 @@ def test_classify_axes_modal_fallback(monkeypatch, tmp_path):
# Should now return SVD component labels from SVD_THEMES
assert (
"Economische sectorbelangen" in enriched["x_label"]
or "sectorbelangen" in enriched["x_label"].lower()
"Fiscaal-economisch" in enriched["x_label"]
or "fiscaal-economisch" in enriched["x_label"].lower()
)
assert (
"Nationalistisch" in enriched["y_label"]
+2 -2
View File
@@ -78,9 +78,9 @@ def test_get_svd_label_returns_correct_label():
"""Test that get_svd_label returns the correct label for each component."""
from analysis.svd_labels import get_svd_label
# Component 1 should return "Economische sectorbelangen versus sociale welvaart"
# Component 1 should return "Fiscaal-economisch beleid versus sociaal welzijn en internationale rechten"
label1 = get_svd_label(1)
assert "Economische sectorbelangen" in label1 or "sectorbelangen" in label1.lower()
assert "Fiscaal-economisch" in label1 or "fiscaal-economisch" in label1.lower()
# Component 2 should return "Nationalistische versus multilateralistische oriëntatie"
label2 = get_svd_label(2)