@php
$sentiment = $article->newsSentiment->sentiment;
$bgClass = $sentiment === 'positive' ? 'bg-green-900 text-green-300' :
($sentiment === 'negative' ? 'bg-red-900 text-red-300' : 'bg-yellow-900 text-yellow-300');
@endphp
@if($sentiment === 'positive')
@elseif($sentiment === 'negative')
@else
@endif
{{ ucfirst($sentiment) }}
Positive
{{ number_format($article->newsSentiment->positive_percentage, 1) }}%
Negative
{{ number_format($article->newsSentiment->negative_percentage, 1) }}%
Neutral
{{ number_format($article->newsSentiment->neutral_percentage, 1) }}%
Total Words
{{ number_format($article->newsSentiment->total_words) }}
Analyzed Words
{{ number_format($article->newsSentiment->analyzed_words) }}
Positive Score
{{ number_format($article->newsSentiment->positive_score, 2) }}
Negative Score
{{ number_format($article->newsSentiment->negative_score, 2) }}