LordXido commited on
Commit
9676486
·
verified ·
1 Parent(s): 5eda8eb

Update sentiment_engine.py

Browse files
Files changed (1) hide show
  1. sentiment_engine.py +4 -10
sentiment_engine.py CHANGED
@@ -1,13 +1,7 @@
1
- def sentiment_features(news_payload):
2
- articles = []
3
- for block in news_payload:
4
- articles.extend(block.get("articles", []))
5
-
6
- count = len(articles)
7
- unique_titles = len(set(a.get("title","") for a in articles))
8
 
 
9
  return {
10
- "article_count": count,
11
- "diversity_ratio": unique_titles / max(count, 1),
12
- "sentiment_pressure": min(1.0, count / 50.0)
13
  }
 
1
+ import random
 
 
 
 
 
 
2
 
3
+ def sentiment_kernel(commodity):
4
  return {
5
+ "market_confidence": round(random.uniform(0.6, 0.95), 2),
6
+ "risk_bias": "neutral"
 
7
  }