MAHMOUD ABDELNABY
Social · CURATED DATASET · 1

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.json
  • docs/annotation-methodology.md
  • docs/sentiment-methodology.md
  • examples/classified_sample_tweets.csv
  • LICENSE
  • README.md
  • rules/arabic_sentiment_lexicon.json
  • rules/sarcasm_dialect_markers.json
  • SOURCES.md
  • src/arabic_sentiment.py
  • src/sentiment_tester.py
  • tests/test_sarcasm_cases.py

How to evaluate and use it

  1. Read the README first and confirm that the documented problem matches your use case.
  2. Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
  3. Follow the repository’s Quick Start and check prerequisites before running commands.
  4. 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.

Related repositories