{% extends "layouts/base.html" %} {% load i18n %} {% block title %}{% trans "Sentiment Dashboard" %}{% endblock %} {% block content %}

{% trans "Sentiment Analytics Dashboard" %}

{% trans "AI-powered sentiment analysis insights" %}

{% trans "View All Results" %} {% trans "Analyze Text" %}
{% trans "Total Analyzed" %}

{{ overall_stats.total }}

😊 {% trans "Positive" %}

{{ overall_stats.positive }}

{{ overall_stats.positive_pct }}%
😐 {% trans "Neutral" %}

{{ overall_stats.neutral }}

{{ overall_stats.neutral_pct }}%
😞 {% trans "Negative" %}

{{ overall_stats.negative }}

{{ overall_stats.negative_pct }}%
{% trans "Sentiment Distribution" %}
😊 {% trans "Positive" %} {{ overall_stats.positive }} ({{ overall_stats.positive_pct }}%)
😐 {% trans "Neutral" %} {{ overall_stats.neutral }} ({{ overall_stats.neutral_pct }}%)
😞 {% trans "Negative" %} {{ overall_stats.negative }} ({{ overall_stats.negative_pct }}%)

{% trans "Avg Score" %}

{{ overall_stats.avg_score|floatformat:2 }}

{% trans "Avg Confidence" %}

{{ overall_stats.avg_confidence|floatformat:2 }}

{% trans "Language Distribution" %}
{% for lang_stat in language_stats %}
{% if lang_stat.language == 'ar' %} العربية (Arabic) {% else %} English {% endif %} {{ lang_stat.count }}
{% endfor %}
{% trans "Sentiment by Language" %}
{% for lang, stats in sentiment_by_language.items %}
{% if lang == 'ar' %}العربية{% else %}English{% endif %}:
😊 {{ stats.positive }} ({{ stats.positive_pct }}%) 😐 {{ stats.neutral }} ({{ stats.neutral_pct }}%) 😞 {{ stats.negative }} ({{ stats.negative_pct }}%)
{% endfor %}
{% trans "Top Keywords" %}
{% if top_keywords %} {% for keyword, count in top_keywords %}
{{ keyword }} {{ count }}
{% endfor %} {% else %}

{% trans "No keywords found" %}

{% endif %}
{% trans "AI Service Usage" %}
{% for service_stat in service_stats %}
{{ service_stat.ai_service }} {{ service_stat.count }}
{% endfor %}
{% trans "Recent Analysis Results" %}
{% for result in recent_results %} {% empty %} {% endfor %}
{% trans "Text" %} {% trans "Sentiment" %} {% trans "Score" %} {% trans "Language" %} {% trans "Date" %} {% trans "Actions" %}
{{ result.text }}
{% if result.sentiment == 'positive' %} 😊 {% trans "Positive" %} {% elif result.sentiment == 'negative' %} 😞 {% trans "Negative" %} {% else %} 😐 {% trans "Neutral" %} {% endif %} {{ result.sentiment_score|floatformat:2 }} {% if result.language == 'ar' %} AR {% else %} EN {% endif %} {{ result.created_at|date:"Y-m-d H:i" }}
{% trans "No recent results" %}
{% endblock %}