File size: 4,888 Bytes
5ffb8e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b1c50f8
 
 
 
 
 
 
 
 
 
 
 
5ffb8e5
b1c50f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
dataset_info:
  features:
  - name: sentence
    dtype: string
  - name: label
    dtype: int64
  - name: __index_level_0__
    dtype: int64
  splits:
  - name: train
    num_bytes: 1017693
    num_examples: 13669
  - name: test
    num_bytes: 269633
    num_examples: 3400
  download_size: 713636
  dataset_size: 1287326
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
license: lgpl-3.0
task_categories:
- text-classification
language:
- ar
tags:
- arabic
- tunisian
- sentiment_analysis
pretty_name: Tunisian Sentiment Analysis Corpus (TSAC)
size_categories:
- 10K<n<100K
---

# Tunisian Sentiment Analysis Corpus (TSAC)

The **Tunisian Sentiment Analysis Corpus (TSAC)** is a collection of approximately **17,000 Tunisian Arabic user comments** manually annotated for **sentiment polarity** (positive or negative).  
It was collected from Facebook comments written on the official pages of Tunisian radio and TV stations between **January 2015 and June 2016**.

This cleaned and Hugging Face–ready version of TSAC provides train/test splits in a simple format compatible with any modern NLP framework.

---

## Dataset Details

### Dataset Description

- **Name:** Tunisian Sentiment Analysis Corpus (TSAC)
- **Curated by:** Salima Medhaffar, Fethi Bougares, Yannick Estève, and Lamia Hadrich-Belguith  
- **Language:** Tunisian Arabic (Arabic script)
- **License:** Apache License 2.0
- **Original Repository:** [https://github.com/fbougares/TSAC](https://github.com/fbougares/TSAC)
- **Hugging Face Maintainer:** [tunis-ai](https://huggingface.co/tunis-ai)

### Dataset Sources

- **Data collected from:** Official Facebook pages of  
  - Mosaique FM  
  - Jawhara FM  
  - Shems FM  
  - Hiwar Ettounsi TV  
  - Nessma TV  
- **Timeframe:** January 2015 – June 2016
- **Paper:** [Medhaffar et al., 2017 — *Sentiment Analysis of Tunisian Dialects: Linguistic Resources and Experiments*](https://aclanthology.org/W17-1307/)

---

## Uses

### Direct Use

The dataset is suitable for:
- Sentiment analysis in Tunisian Arabic
- Dialectal Arabic language modeling
- Evaluation of cross-dialectal or multilingual sentiment models

### Out-of-Scope Use

- Not suitable for general Modern Standard Arabic (MSA) tasks.
- Not recommended for topic classification or sarcasm detection without adaptation.

---

## Dataset Structure

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `sentence` | string | User comment written in Tunisian Arabic |
| `label` | int | Sentiment label (1 = positive, 0 = negative) |

### Splits

| Split | # Examples |
|--------|-------------|
| Train | 13,669 |
| Test  | 3,400 |

Splits were created using a stratified partition to maintain class balance.

---

## Dataset Creation

### Curation Rationale

The dataset was built to support research in sentiment analysis for **Tunisian Arabic**, a dialect that differs significantly from Modern Standard Arabic and lacks large-scale annotated resources.

### Data Collection and Processing

Comments were collected from Facebook public pages using web scraping tools, manually filtered for relevance, and annotated by native Tunisian speakers into two polarity classes: **positive** and **negative**.

Preprocessing steps include:
- Removing URLs, emojis, and metadata
- Normalizing Arabic characters
- Deduplicating sentences

### Source Data Producers

Public Facebook users posting on the mentioned Tunisian media pages between 2015 and 2016.

### Annotations

- **Annotation Type:** Binary sentiment classification (positive/negative)
- **Annotators:** Native Tunisian Arabic speakers
- **Validation:** Manual cross-checking and agreement verification by linguists

### Personal and Sensitive Information

Comments are publicly available and were anonymized by removing any identifiable information (e.g., usernames, mentions).

---

## Bias, Risks, and Limitations

The dataset reflects opinions expressed on public Facebook pages and may include demographic, temporal, or topical biases.  
It should not be used to infer general population sentiment or to train systems that make sensitive decisions about individuals.

---

## Citation

If you use this dataset, please cite the following paper:

**BibTeX:**
```bibtex
@inproceedings{medhaffar-etal-2017-sentiment,
    title = "Sentiment Analysis of {T}unisian Dialects: Linguistic Resources and Experiments",
    author = "Medhaffar, Salima  and Bougares, Fethi  and Estève, Yannick  and Hadrich-Belguith, Lamia",
    booktitle = "Proceedings of the Third Arabic Natural Language Processing Workshop",
    month = apr,
    year = "2017",
    address = "Valencia, Spain",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/W17-1307/",
    pages = "55--61",
    doi = "10.18653/v1/W17-1307"
}