Downloads · 30 days
4
10% of all-time downloads
fatemamojibor/propaganda-ner-model
propaganda-ner-model is a token classification model from fatemamojibor. Use it when you need labels on individual words, such as names. It is set up for transformers.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
Downloads · 30 days
4
10% of all-time downloads
All-time downloads
39
Public
Parameters
135M
539 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors539 MB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("fatemamojibor/propaganda-ner-model") model = AutoModelForSequenceClassification.from_pretrained("fatemamojibor/propaganda-ner-model")
text = "إن زعيمنا وحده هو القادر على إنقاذ الأمة من الكارثة التي تسبب فيها الغرباء. ويتعين على كل الوطنيين الحقيقيين أن يتبعوا قراراته ويدعموها دون أدنى شك من أجل استعادة عظمة بلادنا."
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=512)
outputs = model(**inputs)
logits = outputs.logits predicted_class = logits.argmax(dim=-1).item() print(f"Predicted class: {predicted_class}")
Use directly: the label is encoded as: {'O': 0, 'Appeal_to_Values': 1, 'Loaded_Language': 2, 'Consequential_Oversimplification': 3, 'Causal_Oversimplification': 4, 'Questioning_the_Reputation': 5, 'Straw_Man': 6, 'Repetition': 7, 'Guilt_by_Association': 8, 'Appeal_to_Hypocrisy': 9, 'Conversation_Killer': 10, 'False_Dilemma-No_Choice': 11, 'Whataboutism': 12, 'Slogans': 13, 'Obfuscation-Vagueness-Confusion': 14, 'Name_Calling-Labeling': 15, 'Flag_Waving': 16, 'Doubt': 17, 'Appeal_to_Fear-Prejudice': 18, 'Exaggeration-Minimisation': 19, 'Red_Herring': 20, 'Appeal_to_Popularity': 21, 'Appeal_to_Authority': 22, 'Appeal_to_Time': 23} {0: 'O', 1: 'Appeal_to_Values', 2: 'Loaded_Language', 3: 'Consequential_Oversimplification', 4: 'Causal_Oversimplification', 5: 'Questioning_the_Reputation', 6: 'Straw_Man', 7: 'Repetition', 8: 'Guilt_by_Association', 9: 'Appeal_to_Hypocrisy', 10: 'Conversation_Killer', 11: 'False_Dilemma-No_Choice', 12: 'Whataboutism', 13: 'Slogans', 14: 'Obfuscation-Vagueness-Confusion', 15: 'Name_Calling-Labeling', 16: 'Flag_Waving', 17: 'Doubt', 18: 'Appeal_to_Fear-Prejudice', 19: 'Exaggeration-Minimisation', 20: 'Red_Herring', 21: 'Appeal_to_Popularity', 22: 'Appeal_to_Authority', 23: 'Appeal_to_Time'}
https://github.com/rafiulbiswas/ArAIEval_ArabicNLP24_Task_1
Given a multigenre text snippet (a news paragraph or a tweet), the task is to detect the propaganda techniques used in the text together with the exact span(s) in which each propaganda technique appears. This a sequence tagging task.
BibTeX:
@inproceedings{biswas-etal-2024-mememind, title = "{M}eme{M}ind at {A}r{AIE}val Shared Task: Spotting Persuasive Spans in {A}rabic Text with Persuasion Techniques Identification", author = "Biswas, Md. Rafiul and Shah, Zubair and Zaghouani, Wajdi", booktitle = "Proceedings of The Second Arabic Natural Language Processing Conference", month = aug, year = "2024", address = "Bangkok, Thailand", publisher = "Association for Computational Linguistics", url = "https://aclanthology.org/2024.arabicnlp-1.50", pages = "494--500", }
[More Information Needed]