Link dataset to paper and improve documentation

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +48 -53
README.md CHANGED
@@ -1,51 +1,51 @@
1
  ---
2
- license: cc-by-4.0
3
  language:
4
- - ar
5
- task_categories:
6
- - text-classification
7
- - text-generation
8
  size_categories:
9
- - 10M<n<100M
10
- pretty_name: "Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry"
11
-
 
 
12
  dataset_info:
13
  features:
14
- - name: art_id
15
- dtype: int32
16
- - name: artist_id
17
- dtype: int32
18
- - name: artist_name
19
- dtype: string
20
- - name: art_title
21
- dtype: string
22
- - name: writer
23
- dtype: string
24
- - name: composer
25
- dtype: string
26
- - name: verse_order
27
- dtype: int32
28
- - name: verse_lyrics
29
- dtype: string
30
- - name: origin
31
- dtype: string
32
- - name: dialect
33
- dtype: string
34
- - name: type
35
- dtype: string
36
- - name: corpus_version
37
- dtype: string
38
- - name: word_count
39
- dtype: int32
40
-
41
  splits:
42
- - name: train
43
- - name: validation
44
- - name: test
45
  ---
46
 
47
  # Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry
48
 
 
 
49
  **Tarab** is a large-scale Arabic creative-text corpus that unifies **song lyrics** and **poetry** in a single verse-level representation.
50
  It contains **2,557,311 verses** and **13,509,336 tokens**, spanning **Classical Arabic**, **MSA**, and six major regional dialect groups, and covering both **modern countries** and **historical eras**.
51
 
@@ -140,7 +140,7 @@ The repository includes `train.csv`, `validation.csv`, and `test.csv` created us
140
 
141
  This avoids leakage where verses from the same work appear in multiple splits.
142
 
143
- ```
144
  import pandas as pd
145
  from sklearn.model_selection import train_test_split
146
 
@@ -250,19 +250,12 @@ In addition to the standard train/validation/test splits, the repository provide
250
  Each file contains all verses belonging to a single dialect category:
251
 
252
  - Classical
253
-
254
  - MSA
255
-
256
  - Egyptian
257
-
258
  - Gulf
259
-
260
  - Levantine
261
-
262
  - Iraqi
263
-
264
  - Sudanese
265
-
266
  - Maghrebi
267
 
268
  The dialect splits are derived directly from the master file and preserve full metadata, including origin, type, and art_id.
@@ -270,14 +263,11 @@ The dialect splits are derived directly from the master file and preserve full m
270
  These subsets support:
271
 
272
  - Dialect-specific modelling and evaluation
273
-
274
  - Controlled experiments on regional linguistic variation
275
-
276
  - Cross-dialect transfer learning
277
-
278
  - Vocabulary and stylistic analysis within dialect boundaries
279
 
280
- ```
281
  import os
282
  import pandas as pd
283
 
@@ -303,7 +293,9 @@ df["dialect"] = df["dialect"].astype(str).str.strip()
303
  # Get unique dialects
304
  dialects = sorted(df["dialect"].unique())
305
 
306
- print("\nCreating files per dialect...\n")
 
 
307
 
308
  for d in dialects:
309
  dialect_df = df[df["dialect"] == d]
@@ -317,7 +309,8 @@ for d in dialects:
317
  print(f"{d}:")
318
  print(f" Verses: {len(dialect_df):,}")
319
  print(f" Works: {dialect_df['art_id'].nunique():,}")
320
- print(f" File: {output_path}\n")
 
321
 
322
  print("Done.")
323
  ```
@@ -356,6 +349,7 @@ This split should be treated as weakly supervised metadata derived from web cate
356
  ## Citation
357
 
358
  If you use Tarab, please cite:
 
359
  ```bibtex
360
  @inproceedings{elhaj2026tarab,
361
  title={Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry},
@@ -365,4 +359,5 @@ If you use Tarab, please cite:
365
  address={Rabat, Morocco},
366
  month={March},
367
  year={2026}
368
- }
 
 
1
  ---
 
2
  language:
3
+ - ar
4
+ license: cc-by-4.0
 
 
5
  size_categories:
6
+ - 10M<n<100M
7
+ task_categories:
8
+ - text-classification
9
+ - text-generation
10
+ pretty_name: 'Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry'
11
  dataset_info:
12
  features:
13
+ - name: art_id
14
+ dtype: int32
15
+ - name: artist_id
16
+ dtype: int32
17
+ - name: artist_name
18
+ dtype: string
19
+ - name: art_title
20
+ dtype: string
21
+ - name: writer
22
+ dtype: string
23
+ - name: composer
24
+ dtype: string
25
+ - name: verse_order
26
+ dtype: int32
27
+ - name: verse_lyrics
28
+ dtype: string
29
+ - name: origin
30
+ dtype: string
31
+ - name: dialect
32
+ dtype: string
33
+ - name: type
34
+ dtype: string
35
+ - name: corpus_version
36
+ dtype: string
37
+ - name: word_count
38
+ dtype: int32
 
39
  splits:
40
+ - name: train
41
+ - name: validation
42
+ - name: test
43
  ---
44
 
45
  # Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry
46
 
47
+ This repository contains the data presented in the paper [Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry](https://huggingface.co/papers/2603.16601).
48
+
49
  **Tarab** is a large-scale Arabic creative-text corpus that unifies **song lyrics** and **poetry** in a single verse-level representation.
50
  It contains **2,557,311 verses** and **13,509,336 tokens**, spanning **Classical Arabic**, **MSA**, and six major regional dialect groups, and covering both **modern countries** and **historical eras**.
51
 
 
140
 
141
  This avoids leakage where verses from the same work appear in multiple splits.
142
 
143
+ ```python
144
  import pandas as pd
145
  from sklearn.model_selection import train_test_split
146
 
 
250
  Each file contains all verses belonging to a single dialect category:
251
 
252
  - Classical
 
253
  - MSA
 
254
  - Egyptian
 
255
  - Gulf
 
256
  - Levantine
 
257
  - Iraqi
 
258
  - Sudanese
 
259
  - Maghrebi
260
 
261
  The dialect splits are derived directly from the master file and preserve full metadata, including origin, type, and art_id.
 
263
  These subsets support:
264
 
265
  - Dialect-specific modelling and evaluation
 
266
  - Controlled experiments on regional linguistic variation
 
267
  - Cross-dialect transfer learning
 
268
  - Vocabulary and stylistic analysis within dialect boundaries
269
 
270
+ ```python
271
  import os
272
  import pandas as pd
273
 
 
293
  # Get unique dialects
294
  dialects = sorted(df["dialect"].unique())
295
 
296
+ print("
297
+ Creating files per dialect...
298
+ ")
299
 
300
  for d in dialects:
301
  dialect_df = df[df["dialect"] == d]
 
309
  print(f"{d}:")
310
  print(f" Verses: {len(dialect_df):,}")
311
  print(f" Works: {dialect_df['art_id'].nunique():,}")
312
+ print(f" File: {output_path}
313
+ ")
314
 
315
  print("Done.")
316
  ```
 
349
  ## Citation
350
 
351
  If you use Tarab, please cite:
352
+
353
  ```bibtex
354
  @inproceedings{elhaj2026tarab,
355
  title={Tarab: A Multi-Dialect Corpus of Arabic Lyrics and Poetry},
 
359
  address={Rabat, Morocco},
360
  month={March},
361
  year={2026}
362
+ }
363
+ ```