Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,108 +1,136 @@
|
|
| 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 |
---
|
|
|
|
| 1 |
+
---
|
| 2 |
+
dataset_name: "KALIMAT"
|
| 3 |
+
dataset_summary: "Kalimat - a multipurpose Arabic Corpus containing 18k+ news articles across multiple categories, provided in CSV, JSONL, and zipped TXT formats."
|
| 4 |
+
language:
|
| 5 |
+
- ar
|
| 6 |
+
license: "cc-by-4.0"
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-classification
|
| 9 |
+
- text-generation
|
| 10 |
+
- language-modeling
|
| 11 |
+
pretty_name: "Kalimat - a multipurpose Arabic Corpus"
|
| 12 |
+
size_categories:
|
| 13 |
+
- 10K<n<100K
|
| 14 |
+
tags:
|
| 15 |
+
- arabic
|
| 16 |
+
- news
|
| 17 |
+
- corpus
|
| 18 |
+
- nlp
|
| 19 |
+
- low-resource
|
| 20 |
+
configs:
|
| 21 |
+
- config_name: default
|
| 22 |
+
data_files:
|
| 23 |
+
- kalimat.csv
|
| 24 |
+
- kalimat.jsonl
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
# Kalimat - a multipurpose Arabic Corpus
|
| 30 |
+
|
| 31 |
+
This repository provides a cleaned and consolidated version of the **Kalimat - a multipurpose Arabic Corpus**, containing **18,256 Arabic news articles** collected from a diverse range of domains. The original material consisted of thousands of individual `.txt` files organised across multiple category folders. These have been reconstructed, normalised, and compiled into modern machine-learning-friendly formats.
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## π Corpus Overview
|
| 36 |
+
|
| 37 |
+
The corpus includes **20k+** articles covering a wide selection of news categories:
|
| 38 |
+
|
| 39 |
+
- **Politics**
|
| 40 |
+
- **Economy**
|
| 41 |
+
- **Culture**
|
| 42 |
+
- **Religion**
|
| 43 |
+
- **Sport**
|
| 44 |
+
- **Social / Society-related topics**
|
| 45 |
+
- **Other sub-domains depending on the original folder structure**
|
| 46 |
+
|
| 47 |
+
Each article was originally stored as *one word per line*. In this cleaned edition, all documents have been reconstructed into natural text format with proper spacing, UTF-8 encoding, and consistent metadata extraction.
|
| 48 |
+
|
| 49 |
+
Although the original filenames varied widely, each document is now associated with the following fields:
|
| 50 |
+
|
| 51 |
+
- **id** β numeric identifier extracted from the filename (or `-1` where none existed)
|
| 52 |
+
- **filename** β original filename exactly as it appeared
|
| 53 |
+
- **category** β derived from directory structure or filename
|
| 54 |
+
- **year_month** β extracted from filename where possible, otherwise `"unknown"`
|
| 55 |
+
- **text** β reconstructed, cleaned article text
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## π¦ Provided Formats
|
| 60 |
+
|
| 61 |
+
The cleaned dataset is released in the following forms:
|
| 62 |
+
|
| 63 |
+
### **1. CSV File**
|
| 64 |
+
`kalimat.csv`
|
| 65 |
+
|
| 66 |
+
A single UTF-8 CSV containing all metadata and article texts.
|
| 67 |
+
|
| 68 |
+
### **2. JSONL File**
|
| 69 |
+
`kalimat.jsonl`
|
| 70 |
+
|
| 71 |
+
One JSON object per line, suitable for training modern NLP models (e.g. HuggingFace Transformers).
|
| 72 |
+
|
| 73 |
+
### **3. TXT Version (Zipped)**
|
| 74 |
+
`kalimat_txt.zip`
|
| 75 |
+
|
| 76 |
+
All reconstructed `.txt` documents are included in a single compressed archive to avoid storing thousands of individual files in the repository. Each `.txt` file uses the original filename for easy reference.
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## π Train / Validation / Test Splits
|
| 81 |
+
|
| 82 |
+
The dataset has been randomly split (using a fixed seed for reproducibility) into:
|
| 83 |
+
|
| 84 |
+
- **Training set** β 80%
|
| 85 |
+
- **Validation set** β 10%
|
| 86 |
+
- **Test set** β 10%
|
| 87 |
+
|
| 88 |
+
These splits are provided as:
|
| 89 |
+
|
| 90 |
+
- `kalimat_train.csv`
|
| 91 |
+
- `kalimat_val.csv`
|
| 92 |
+
- `kalimat_test.csv`
|
| 93 |
+
|
| 94 |
+
All CSVs preserve the same column structure as the main file.
|
| 95 |
+
|
| 96 |
+
### Code used for splitting (for reference)
|
| 97 |
+
|
| 98 |
+
```
|
| 99 |
+
python
|
| 100 |
+
import pandas as pd
|
| 101 |
+
from sklearn.model_selection import train_test_split
|
| 102 |
+
|
| 103 |
+
df = pd.read_csv("kalimat.csv", encoding="utf-8")
|
| 104 |
+
|
| 105 |
+
train_df, temp_df = train_test_split(
|
| 106 |
+
df, test_size=0.20, random_state=42, shuffle=True
|
| 107 |
+
)
|
| 108 |
+
|
| 109 |
+
val_df, test_df = train_test_split(
|
| 110 |
+
temp_df, test_size=0.50, random_state=42, shuffle=True
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
train_df.to_csv("kalimat_train.csv", index=False, encoding="utf-8")
|
| 114 |
+
val_df.to_csv("kalimat_val.csv", index=False, encoding="utf-8")
|
| 115 |
+
test_df.to_csv("kalimat_test.csv", index=False, encoding="utf-8")
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
### π Repository Structure
|
| 119 |
+
```
|
| 120 |
+
kalimat.csv
|
| 121 |
+
kalimat.jsonl
|
| 122 |
+
kalimat_train.csv
|
| 123 |
+
kalimat_val.csv
|
| 124 |
+
kalimat_test.csv
|
| 125 |
+
kalimat_txt.zip
|
| 126 |
+
README.md
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
## π Citation
|
| 130 |
+
|
| 131 |
+
If you use this dataset in your work, please cite the original Kalimat paper:
|
| 132 |
+
|
| 133 |
+
El-Haj, M., & Koulali, R. (2013). _Kalimat: a multipurpose Arabic corpus_. In Second Workshop on Arabic Corpus Linguistics (WACL-2), pp. 22β25.
|
| 134 |
+
[PDF available here](https://elhaj.uk/docs/KALIMAT_ELHAJ_KOULALI.pdf)
|
| 135 |
+
|
| 136 |
---
|