{% extends "layouts/base.html" %} {% load i18n %} {% block title %}{% trans "Sentiment Result" %} - {{ result.id }}{% endblock %} {% block content %}

{% trans "Sentiment Analysis Result" %}

{{ result.created_at|date:"Y-m-d H:i:s" }}

{% trans "Back to List" %}
{% csrf_token %}
{% trans "Analyzed Text" %}

{{ result.text }}

{% if result.language == 'ar' %}العربية{% else %}English{% endif %}
{% trans "Sentiment Analysis" %}
{% trans "Sentiment" %}
{% if result.sentiment == 'positive' %}

😊 {% trans "Positive" %}

{% elif result.sentiment == 'negative' %}

😞 {% trans "Negative" %}

{% else %}

😐 {% trans "Neutral" %}

{% endif %}
{% trans "Score" %}

{{ result.sentiment_score|floatformat:4 }}

(-1 to +1)
{% trans "Confidence" %}

{{ result.confidence|floatformat:2 }}

{% if result.keywords %}
{% trans "Keywords" %}
{% for keyword in result.keywords %} {{ keyword }} {% endfor %}
{% endif %} {% if result.entities %}
{% trans "Entities" %}
{% for entity in result.entities %} {% endfor %}
{% trans "Text" %} {% trans "Type" %}
{{ entity.text }} {{ entity.type }}
{% endif %} {% if result.emotions %}
{% trans "Emotions" %}
{% for emotion, score in result.emotions.items %} {% if score > 0 %}
{{ emotion }} {{ score|floatformat:2 }}
{% endif %} {% endfor %}
{% endif %}
{% trans "Metadata" %}
{% trans "ID" %}
{{ result.id }}
{% trans "AI Service" %}
{{ result.ai_service }}
{% trans "AI Model" %}
{{ result.ai_model|default:"-" }}
{% trans "Processing Time" %}
{{ result.processing_time_ms }} ms
{% trans "Created" %}
{{ result.created_at|date:"Y-m-d H:i:s" }}
{% trans "Updated" %}
{{ result.updated_at|date:"Y-m-d H:i:s" }}
{% if related_object %}
{% trans "Related Object" %}

{% trans "Type" %}: {{ result.content_type.model }}

{% trans "Object" %}: {{ related_object }}

{% endif %}
{% endblock %}