467b0d1be1a0b69b4622fa4ba9aae08015daff5a
Previously, components 1-2 in the SVD tab used Procrustes-aligned PCA coordinates (from load_positions), which meant the SVD tab showed PCA dimensions of the 50D aligned space rather than the actual raw SVD components. This was a fundamental inconsistency — the SVD tab's component 2 showed completely different party ordering than the raw SVD component 2. Changes: - explorer.py: Unified all components 1-10 to use raw SVD values via load_party_axis_scores_for_window(). Removed the separate load_positions() path for components 1-2. Now all components use the same data source (50D vectors from svd_vectors table). - explorer.py: Updated flip computation to cover ALL components 1-10 (was range 3-11 for components 3-10 only). The compute_flip_direction function correctly determines sign for each component. - explorer.py: Unified rendering to always use _render_party_axis_chart_1d (was _render_party_axis_chart for components 1-2 using 2D coords). - explorer.py: Unified trajectory to always use load_party_scores_all_windows. - analysis/config.py: Updated component 1 label (simplified explanation, removed coalition-specific policy references). - analysis/config.py: Updated component 2 label to "Nationalistisch versus kosmopolitisch" matching raw SVD data (PVV/FVD at positive extreme, Volt/DENK/GL-PvdA at negative extreme). - tests: Updated test assertions to match new labels. - scripts/validate_svd_themes.py: Verified all components pass right-wing alignment check, config flip consistency, and theme pole consistency. Fixes the core inconsistency: SVD tab component 2 now uses the same raw SVD data as components 3-10, with consistent party ordering and labels. The compass remains a separate PCA-based visualization.
stemwijzer
A small project that uses QWEN embeddings for semantic features. The codebase includes an example Ansible package under packages/@ansible/example and helper scripts for deployment.
Embeddings
- This project uses QWEN embeddings (model:
qwen/qwen3-embedding-4b) via OpenRouter-compatible APIs. - Preferred environment variable:
OPENROUTER_API_KEYwith a fallback toOPENAI_API_KEY.
Publishing and deploying the Ansible package
- Package location:
packages/@ansible/example— this contains the Ansible playbooks and packaging used by CI. - To publish the package (CI): create a git tag for the version and provide
NPM_TOKENas a secret to the CI runner so it can publish to npm. - To deploy the package (CI): set the following repository secrets in your CI pipeline:
DEPLOY_HOST(default:motief.sgeboers.nl)DEPLOY_SSH_KEY(private key for thewebappsuser)DEPLOY_USER(default:webapps)
Defaults
- DEPLOY_HOST:
motief.sgeboers.nl - DEPLOY_USER:
webapps
See docs/deployment/ansible-package-deploy.md for more detailed deploy instructions and defaults.
Languages
HTML
96.7%
Python
3.2%