TRACES Model for Detecting Untrue Bulgarian Texts with F1-Score 0.96
Creators
Description
The purpose of this model is to provide an indication of whether a given text in Bulgarian potentially contains untrue information.
It outputs a probability label for the class "0" (contains TRUE information) and for the class "1" (contains UNTRUE information).
It can be combined with models, recognizing automatically generated texts, in order to identify textual deepfakes.
The model has been trained on Bulgarian social media messages, each manually labeled by three Bulgarian journalists of containing untrue information or not. It uses a tfidf vectorizer, also supplied.
The model achieves these values:
Accuracy: 0.933920704845815 Precision: 0.9324324324324325 Recall: 1.0 F1-score: 0.965034965034965
It can be loaded in this way (using Python):
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
import pickle
with open('SVM_model_untrue_inform_detection_tfidf_bg_0.96_F1_score.pkl', 'rb') as f1:
svm_model = pickle.load(f1)
with open('tfidf_vectorizer_untrue_inform_detection_tfidf_bg_0.96_F1_score.pkl', 'rb') as f2:
vectorizer = pickle.load(f2)
new_text="Нямам представа къде са изчезнали бисквитките."
X_test = vectorizer.transform(new_text)
y_pred = svm_model.predict(X_test)
probability_estimate = svm_model.predict_proba(X_test)
if y_pred == 1:
print ("The text contains untrue information")
print ("Probability:",probability_estimate[0][1])
elif y_pred == 0:
print ("The text does not contain untrue information")
print ("Probability:",probability_estimate[0][0])
print ("Probability:",probability_estimate)