--- license: cc-by-nc-sa-4.0 task_categories: - text-classification language: - ar tags: - Social Media - News Media - Sentiment - Stance - Emotion pretty_name: 'LlamaLens: Specialized Multilingual LLM for Analyzing News and Social Media Content -- Arabic' size_categories: - 10K

## LlamaLens This repo includes scripts needed to run our full pipeline, including data preprocessing and sampling, instruction dataset creation, model fine-tuning, inference and evaluation. ### Features - Multilingual support (Arabic, English, Hindi) - 19 NLP tasks with 52 datasets - Optimized for news and social media content analysis ## 📂 Dataset Overview ### Arabic Datasets | **Task** | **Dataset** | **# Labels** | **# Train** | **# Test** | **# Dev** | |---------------------------|------------------------------|--------------|-------------|------------|-----------| | Attentionworthiness | CT22Attentionworthy | 9 | 2,470 | 1,186 | 1,071 | | Checkworthiness | CT24_T1 | 2 | 22,403 | 500 | 1,093 | | Claim | CT22Claim | 2 | 3,513 | 1,248 | 339 | | Cyberbullying | ArCyc_CB | 2 | 3,145 | 900 | 451 | | Emotion | Emotional-Tone | 8 | 7,024 | 2,009 | 1,005 | | Emotion | NewsHeadline | 7 | 939 | 323 | 160 | | Factuality | Arafacts | 5 | 4,354 | 1,245 | 623 | | Factuality | COVID19Factuality | 2 | 3,513 | 988 | 339 | | Harmful | CT22Harmful | 2 | 2,484 | 1,201 | 1,076 | | Hate Speech | annotated-hatetweets-4-classes | 4 | 210,526 | 100,565 | 90,544 | | Hate Speech | OSACT4SubtaskB | 2 | 4,778 | 1,827 | 2,048 | | News Genre Categorization | ASND | 10 | 74,496 | 21,942 | 11,136 | | News Genre Categorization | SANADAkhbarona | 7 | 62,210 | 7,824 | 7,824 | | News Genre Categorization | SANADAlArabiya | 6 | 56,967 | 7,123 | 7,120 | | News Genre Categorization | SANADAlkhaleej | 7 | 36,391 | 4,550 | 4,550 | | News Genre Categorization | UltimateDataset | 10 | 133,036 | 38,456 | 19,269 | | News Credibility | NewsCredibilityDataset | 2 | 8,671 | 2,730 | 1,426 | | Summarization | xlsum | -- | 37,425 | 4,689 | 4,689 | | Offensive Language | ArCyc_OFF | 2 | 3,138 | 900 | 450 | | Offensive Language | OSACT4SubtaskA | 2 | 4,780 | 1,827 | 2,047 | | Propaganda | ArPro | 2 | 6,002 | 1,326 | 672 | | Sarcasm | ArSarcasm-v2 | 2 | 8,749 | 2,996 | 3,761 | | Sentiment | ar_reviews_100k | 3 | 69,998 | 20,000 | 10,000 | | Sentiment | ArSAS | 4 | 13,883 | 3,976 | 1,987 | | Stance | Mawqif-Arabic-Stance-main | 2 | 3,162 | 560 | 950 | | Stance | stance | 3 | 2,652 | 379 | 755 | | Subjectivity | ThatiAR | 2 | 2,446 | 748 | 467 | ## File Format Each JSONL file in the dataset follows a structured format with the following fields: - `id`: Unique identifier for each data entry. - `original_id`: Identifier from the original dataset, if available. - `input`: The original text that needs to be analyzed. - `output`: The label assigned to the text after analysis. - `dataset`: Name of the dataset the entry belongs. - `task`: The specific task type. - `lang`: The language of the input text. - `instructions`: A brief set of instructions describing how the text should be labeled. - `text`: A formatted structure including instructions and response for the task in a conversation format between the system, user, and assistant, showing the decision process. **Example entry in JSONL file:** ``` { "id": "d1662e29-11cf-45cb-bf89-fa5cd993bc78", "original_id": "nan", "input": "الدفاع الجوي السوري يتصدى لهجوم صاروخي على قاعدة جوية في حمص", "output": "not_claim", "dataset": "ans-claim", "task": "Claim detection", "lang": "ar", "instructions": "Analyze the given text and label it as 'claim' if it includes a factual statement that can be verified, or 'not_claim' if it's not a checkable assertion. Return only the label without any explanation, justification or additional text.", "text": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>You are a social media expert providing accurate analysis and insights.<|eot_id|><|start_header_id|>user<|end_header_id|>Analyze the given text and label it as 'claim' if it includes a factual statement that can be verified, or 'not_claim' if it's not a checkable assertion. Return only the label without any explanation, justification or additional text.\ninput: الدفاع الجوي السوري يتصدى لهجوم صاروخي على قاعدة جوية في حمص\nlabel: <|eot_id|><|start_header_id|>assistant<|end_header_id|>not_claim<|eot_id|><|end_of_text|>" } ``` ## 📢 Citation If you use this dataset, please cite our [paper](https://arxiv.org/pdf/2410.15308): ``` @article{kmainasi2024llamalensspecializedmultilingualllm, title={LlamaLens: Specialized Multilingual LLM for Analyzing News and Social Media Content}, author={Mohamed Bayan Kmainasi and Ali Ezzat Shahroor and Maram Hasanain and Sahinur Rahman Laskar and Naeemul Hassan and Firoj Alam}, year={2024}, journal={arXiv preprint arXiv:2410.15308}, volume={}, number={}, pages={}, url={https://arxiv.org/abs/2410.15308}, eprint={2410.15308}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```