@extends('layouts.user') @section('title', 'AI Sentiment Analysis') @section('content')

🤖 AI Sentiment Analysis

Analisis sentimen berita ekonomi dan supply chain menggunakan Lexicon-Based Analysis

Total Berita

{{ number_format($stats['total']) }}

📰

Sentimen Positif

{{ $stats['percentages']['positive'] }}%

{{ number_format($stats['positive']) }} berita

😊

Sentimen Negatif

{{ $stats['percentages']['negative'] }}%

{{ number_format($stats['negative']) }} berita

😔

Sentimen Netral

{{ $stats['percentages']['neutral'] }}%

{{ number_format($stats['neutral']) }} berita

😐

📊 Analisis Berita Terbaru

@forelse($news as $article)

{{ $article->title }}

{{ $article->published_at ? $article->published_at->format('d M Y H:i') : 'N/A' }} @if($article->category) {{ ucfirst($article->category) }} @endif
@if($article->newsSentiment && is_object($article->newsSentiment))
@if($article->newsSentiment->sentiment === 'positive') 😊 Positif @elseif($article->newsSentiment->sentiment === 'negative') 😔 Negatif @else 😐 Netral @endif
+{{ $article->newsSentiment->positive_percentage ?? 0 }}% -{{ $article->newsSentiment->negative_percentage ?? 0 }}%
@else
Belum dianalisis
@endif
@empty
📊

Tidak Ada Berita

Belum ada berita untuk kategori yang dipilih

@endforelse
@if($news->hasPages())
{{ $news->links() }}
@endif

📈 Distribusi Sentimen

Positif
{{ $stats['percentages']['positive'] }}%
Negatif
{{ $stats['percentages']['negative'] }}%
Netral
{{ $stats['percentages']['neutral'] }}%

✍️ Analisis Teks Manual

🏷️ Kata Paling Sering

Kata Positif

@foreach(array_slice($wordClouds['positive'], 0, 10, true) as $word => $count) {{ $word }} ({{ $count }}) @endforeach

Kata Negatif

@foreach(array_slice($wordClouds['negative'], 0, 10, true) as $word => $count) {{ $word }} ({{ $count }}) @endforeach
@endsection @push('styles') @endpush @push('scripts') @endpush