drelhaj commited on
Commit
9b433e9
Β·
verified Β·
1 Parent(s): da3b8ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +135 -107
README.md CHANGED
@@ -1,108 +1,136 @@
1
- # Kalimat Arabic Text Corpus (Cleaned Edition)
2
-
3
- This repository provides a cleaned and consolidated version of the **Kalimat Arabic Text 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.
4
-
5
- ---
6
-
7
- ## πŸ“š Corpus Overview
8
-
9
- The corpus includes **20k+** articles covering a wide selection of news categories:
10
-
11
- - **Politics**
12
- - **Economy**
13
- - **Culture**
14
- - **Religion**
15
- - **Sport**
16
- - **Social / Society-related topics**
17
- - **Other sub-domains depending on the original folder structure**
18
-
19
- 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.
20
-
21
- Although the original filenames varied widely, each document is now associated with the following fields:
22
-
23
- - **id** – numeric identifier extracted from the filename (or `-1` where none existed)
24
- - **filename** – original filename exactly as it appeared
25
- - **category** – derived from directory structure or filename
26
- - **year_month** – extracted from filename where possible, otherwise `"unknown"`
27
- - **text** – reconstructed, cleaned article text
28
-
29
- ---
30
-
31
- ## πŸ“¦ Provided Formats
32
-
33
- The cleaned dataset is released in the following forms:
34
-
35
- ### **1. CSV File**
36
- `kalimat.csv`
37
-
38
- A single UTF-8 CSV containing all metadata and article texts.
39
-
40
- ### **2. JSONL File**
41
- `kalimat.jsonl`
42
-
43
- One JSON object per line, suitable for training modern NLP models (e.g. HuggingFace Transformers).
44
-
45
- ### **3. TXT Version (Zipped)**
46
- `kalimat_txt.zip`
47
-
48
- 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.
49
-
50
- ---
51
-
52
- ## πŸ”€ Train / Validation / Test Splits
53
-
54
- The dataset has been randomly split (using a fixed seed for reproducibility) into:
55
-
56
- - **Training set** – 80%
57
- - **Validation set** – 10%
58
- - **Test set** – 10%
59
-
60
- These splits are provided as:
61
-
62
- - `kalimat_train.csv`
63
- - `kalimat_val.csv`
64
- - `kalimat_test.csv`
65
-
66
- All CSVs preserve the same column structure as the main file.
67
-
68
- ### Code used for splitting (for reference)
69
-
70
- ```
71
- python
72
- import pandas as pd
73
- from sklearn.model_selection import train_test_split
74
-
75
- df = pd.read_csv("kalimat.csv", encoding="utf-8")
76
-
77
- train_df, temp_df = train_test_split(
78
- df, test_size=0.20, random_state=42, shuffle=True
79
- )
80
-
81
- val_df, test_df = train_test_split(
82
- temp_df, test_size=0.50, random_state=42, shuffle=True
83
- )
84
-
85
- train_df.to_csv("kalimat_train.csv", index=False, encoding="utf-8")
86
- val_df.to_csv("kalimat_val.csv", index=False, encoding="utf-8")
87
- test_df.to_csv("kalimat_test.csv", index=False, encoding="utf-8")
88
- ```
89
-
90
- ### πŸ“ Repository Structure
91
- ```
92
- kalimat.csv
93
- kalimat.jsonl
94
- kalimat_train.csv
95
- kalimat_val.csv
96
- kalimat_test.csv
97
- kalimat_txt.zip
98
- README.md
99
- ```
100
-
101
- ## πŸ“„ Citation
102
-
103
- If you use this dataset in your work, please cite the original Kalimat paper:
104
-
105
- El-Haj, M., & Koulali, R. (2013). _Kalimat: a multipurpose Arabic corpus_. In Second Workshop on Arabic Corpus Linguistics (WACL-2), pp. 22–25.
106
- [PDF available here](https://elhaj.uk/docs/KALIMAT_ELHAJ_KOULALI.pdf)
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
  ---