Sentimen Analysis dengan SVM & Naive Bayes

{% if input_text %}

Hasil Naive Bayes

{{ result_nb }}

Hasil SVM

{{ result_svm }}

Detail Proses Preprocessing

{% set step_keys = ["case_folding", "cleansing", "normalization", "convert_negation", "stopwords", "tokenizing", "stemming"] %}
{% for key in step_keys %} {% if processed_steps[key] is defined %}

{{ key | replace('_', ' ') }}

{% if processed_steps[key] is iterable and processed_steps[key] is not string %}

{{ processed_steps[key] | join(', ') }}

{% else %}

{{ processed_steps[key] }}

{% endif %}
{% if not loop.last %}
{% endif %} {% endif %} {% endfor %}

Nilai TF-IDF

{% if tfidf_dict %}
{% for feature, value in tfidf_dict.items() %} {% endfor %}
Fitur Nilai
{{ feature }} {{ value }}
{% else %}

Tidak ada nilai TF-IDF untuk ditampilkan.

{% endif %}
{% endif %}