saheedniyi commited on
Commit
cddae4f
·
verified ·
1 Parent(s): 04d1a86

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -0
README.md CHANGED
@@ -27,3 +27,94 @@ configs:
27
  - split: train
28
  path: data/train-*
29
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  - split: train
28
  path: data/train-*
29
  ---
30
+ # Naijaweb Edu Dataset 🇳🇬
31
+
32
+
33
+ **Naijaweb Edu** is a subset of the [naijaweb dataset](https://huggingface.co/datasets/saheedniyi/naijaweb) with an educational score aboove 3 using the [fineweb classifier](https://huggingface.co/HuggingFaceFW/fineweb-edu-classifier). The initial fineweb dataset was web scraped from web pages popular among Nigerians, providing a rich resource for modeling Nigerian linguistic and cultural contexts.
34
+
35
+ ## Dataset Summary
36
+
37
+ | Features | Data Types |
38
+ |----------------|-------------|
39
+ | text | string |
40
+ | link | string |
41
+ | token_count | int64 |
42
+ | section | string |
43
+ | int_score | int64 |
44
+ | language | string |
45
+ | language_probability | float64 |
46
+
47
+ ## Data Collection
48
+
49
+ The initial fineweb dataset was collected from **Nairaland.com**, extracting **1,795,908 unique posts** from 19 different sections of the site. Additionally, **1,289,195 outbound links** were extracted from these posts. The content of these web pages was extracted using **Trafilatura**, a popular library for web scraping and content extraction.
50
+ The full data collection can be found [in this repo](https://github.com/saheedniyi02/Naijaweb), kindly give a star ().
51
+ ## Data Cleaning
52
+
53
+ The cleaning process was conducted using **[Datatrove](https://github.com/huggingface/datatrove)**, the same library employed in cleaning the **[FineWeb](https://huggingface.co/datasets/HuggingFaceFW/fineweb)** dataset, which is known for its high quality. The data cleaning process involved multiple stages of deduplication, filtering, and normalization to ensure the dataset's quality matches that of other high-performing datasets.
54
+
55
+ ### Data Cleaning Procedure:
56
+ - **URL Filtering**
57
+ - **Repitition and quality filtering:**
58
+ - **Personal Identifiable Information (PII) Removal**
59
+
60
+ ## Example Entry
61
+
62
+ Each data point contains the following fields:
63
+ - `text`: the main body of the post or web page
64
+ - `link`: the original URL of the source content
65
+ - `token_count`: the number of GPT2 tokens in the `text` field
66
+ - `section`: the Nairaland section where the post was found
67
+ - `int_score`: an integer representation of the 'educational quality' of the data based on [fineweb's webpage educational classifier](https://huggingface.co/HuggingFaceFW/fineweb-edu-classifier)
68
+ - `language`: detected language of the text (e.g., `en`, `yo`, `ha`, `ig`)
69
+ - `language_probability`: the confidence score of the language detection algorithm
70
+
71
+ An example looks as follows:
72
+ ```
73
+ {
74
+ 'text': 'Governor Samuel Ortom of Benue State\nBy Peter Duru\nGovernor Samuel Ortom of Benue state has commended President Muhammadu Buhari for his directive to security agents to shoot anyone illegally bearing AK47 rifle in the country.\nThe Governor who gave the commendation Thursday in Makurdi said the President’s order would reduce the level of criminality, banditry and militia herders’ attacks on Benue communities as well as in other parts of the country.\nAccording to him, “the order would also make the communities safer for displaced farmers to return to their ancestral homes.\n“I wish to commend Mr. President for his recent order against those bearing AK47 rifles. This I am sure will reduce the high rate of criminality, banditary and militia herdsmen attacks on our farming communities,” the Governor said.\nHe noted that President Buhari had done the right thing by listening to the calls he and other concerned Nigerians made on the need for the Federal Government to act faster and decisively to save the country from degenerating to a state of anarchy.\n“I don’t only criticise, I also commend where necessary. And I want to say shame on those sycophants who were bashing me for writing to Mr. President because he has finally heeded my advice,” he added.\nGovernor Ortom said Nigeria belonged to all its citizens and only justice and equity anchored on the rule of law could guarantee the unity and stability of the country.\nComments expressed here do not reflect the opinions of Vanguard newspapers or any employee thereof.',
75
+ 'link': 'https://www.vanguardngr.com/2021/03/ortom-commends-buhari-on-shoot-at-sight-order-on-ak47-bearing-criminals/amp/',
76
+ 'token_count': 332,
77
+ 'section': 'Politics',
78
+ 'int_score': 1,
79
+ 'language': 'en',
80
+ 'language_probability': 0.9999465942382812
81
+ }
82
+ ```
83
+
84
+ ## How to Load the Dataset
85
+
86
+ To load the dataset using Hugging Face's `datasets` library:
87
+
88
+ ```python
89
+ from datasets import load_dataset
90
+
91
+ dataset = load_dataset("saheedniyi/naijaweb-edu")
92
+ ```
93
+
94
+ ## Social Impact
95
+
96
+ Naijaweb was created to make Nigerian web data more accessible, providing researchers and developers with a dataset rich in Nigerian contexts across various domains such as **Politics**, **Education**, **Business**, and **Health**.
97
+
98
+ ## Bias and Ethical Considerations
99
+
100
+ Since the data is collected from publicly available web pages, inherent biases present in the sources may be reflected in the dataset. These biases can manifest in areas such as **language**, **ideology**, or **topic representation**. Users should be mindful of these potential biases when developing models, especially for sensitive areas like **legal** or **medical** information.
101
+
102
+ ## Sections of the Dataset
103
+
104
+ The dataset comprises content from 19 different sections of **Nairaland.com**, covering topics such as **Politics**, **Education**, **Business**, and **Health**.
105
+
106
+ Citation
107
+ If you use the Naijaweb-edu dataset in your research, please cite it as follows:
108
+
109
+ Citation
110
+ If you use the Naijaweb dataset in your research, please cite it as follows:
111
+ ```
112
+ @dataset{naijaweb_2024,
113
+ author = {Saheed and Collaborators},
114
+ title = {Naijaweb: A Web Scraped Nigerian Context Dataset},
115
+ year = {2024},
116
+ publisher = {Hugging Face Datasets},
117
+ version = {1.0.0},
118
+ url = {https://huggingface.co/datasets/saheedniyi/naijaweb-edu},
119
+ }
120
+ ```