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

Upload 7 files

Browse files
Files changed (8) hide show
  1. .gitattributes +3 -0
  2. README.md +106 -1
  3. kalimat.csv +3 -0
  4. kalimat.jsonl +3 -0
  5. kalimat_test.csv +0 -0
  6. kalimat_train.csv +3 -0
  7. kalimat_txt.zip +3 -0
  8. kalimat_val.csv +0 -0
.gitattributes CHANGED
@@ -57,3 +57,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ kalimat_train.csv filter=lfs diff=lfs merge=lfs -text
61
+ kalimat.csv filter=lfs diff=lfs merge=lfs -text
62
+ kalimat.jsonl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,108 @@
 
 
 
 
1
  ---
2
- license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ---
kalimat.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c73231106bc30c3a63d9518560144707ac5d04d01a4e398e311db6d7b267006d
3
+ size 95348494
kalimat.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7205ea6d45b9e20cedcb71d48cabdab5cbb2a163add6727e343d0914da40096f
3
+ size 96551180
kalimat_test.csv ADDED
The diff for this file is too large to render. See raw diff
 
kalimat_train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a384fef95d0e104278c05e34d15724947537f5d17cc1bbd973b4e6050bceade8
3
+ size 76171143
kalimat_txt.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01ca9bcd8eb8e2cc3d91897d5065eb9648683cc2937bd0e6a27cf8ca33bcd8f7
3
+ size 34237071
kalimat_val.csv ADDED
The diff for this file is too large to render. See raw diff