Arabic Social Listening Sentiment Classification Rules & Lexicon
Explore a small illustrative Arabic sentiment lexicon and rule-based classifier. It is not a validated 600-rule corpus, and its outputs require human review.
Problem it addresses
Build an open-source dialectal Arabic social listening sentiment package: 1) Illustrative dialectal sentiment lexicon categorized into True Positive, True Negative, Sarcastic/Ironic Negative, and Delivery/Service Complaints across Egyptian and Gulf vernacular, 2) Python heuristic classifier (arabic_sentiment.py), 3) Unit tests for selected classifier behaviors.
Who it is for
PRO operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.
What is inside
Key files listed in the README repository architecture:
data/arabic_sentiment_lexicon.jsondocs/annotation-methodology.mddocs/sentiment-methodology.mdexamples/classified_sample_tweets.csvLICENSEREADME.mdrules/arabic_sentiment_lexicon.jsonrules/sarcasm_dialect_markers.jsonSOURCES.mdsrc/arabic_sentiment.pysrc/sentiment_tester.pytests/test_sarcasm_cases.py
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- Compare outputs with documented examples and review limitations before using them in a decision or client workflow.
Quick Start from the README: python -m unittest discover -s tests · python src/arabic_sentiment.py --help
Scope and limitations
- Sarcasm & Dialectal Inversion: Accounts for common Arabic sarcastic expressions where surface positive words convey negative sentiment.
- Regional Morphology Handling: Distinguishes between Egyptian (مش حلو), Gulf (مو زين), and Levant (مو منيح) negation structures.
- Auditable Heuristic Ruleset: Rule definitions run locally using regex and token lookups without requiring black-box paid APIs.
This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.