feat(news): replace keyword sentiment with VADER
CI/CD / build-and-push (push) Successful in 1m27s

vaderSentiment==3.3.2 added to requirements.txt.

_score_headlines now:
- scores each article (title + description) with VADER compound ∈ [-1, +1]
- filters out articles with |compound| ≤ 0.05 (no clear signal)
- weights remaining articles by recency (GNews newest-first, rank 0 → highest weight)
- returns weighted mean clamped to [-1, +1]

Removes the custom keyword sets (_POSITIVE/_NEGATIVE) and the set-based
bag-of-words algorithm that capped scores at ~±0.5 in practice.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-04-14 12:42:19 +00:00
parent 33ad86f352
commit 82d6d357eb
2 changed files with 40 additions and 34 deletions
+1
View File
@@ -10,6 +10,7 @@ pydantic==2.7.0
# Utils
python-dotenv==1.0.1
vaderSentiment==3.3.2
# Testing
pytest==8.2.0