File size: 11,136 Bytes
763cf68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
04d1a86
763cf68
04d1a86
 
763cf68
 
 
 
 
ff822c7
 
 
 
 
 
 
 
 
 
 
 
763cf68
cddae4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d535aa2
 
cddae4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1b53565
 
 
cddae4f
1b53565
cddae4f
1b53565
cddae4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ca0f63c
 
 
cddae4f
 
 
 
 
 
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
dataset_info:
  features:
  - name: text
    dtype: string
  - name: link
    dtype: string
  - name: token_count
    dtype: int64
  - name: section
    dtype: string
  - name: int_score
    dtype: int64
  - name: language
    dtype: string
  - name: language_probability
    dtype: float64
  splits:
  - name: train
    num_bytes: 31614271
    num_examples: 4398
  download_size: 18245736
  dataset_size: 31614271
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
license: mit
task_categories:
- text-classification
- text2text-generation
- text-generation
language:
- en
- yo
- ig
- ha
size_categories:
- 1K<n<10K
---
# Naijaweb Edu Dataset 🇳🇬


**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.

## Dataset Summary

| Features       | Data Types  |
|----------------|-------------|
| text           | string      |
| link           | string      |
| token_count    | int64       |
| section        | string      |
| int_score      | int64       |
| language       | string      |
| language_probability | float64 |

## Data Collection

The initial fineweb dataset was collected from **Nairaland.com**, extracting **about 30 million 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.
The full data collection can be found [in this repo](https://github.com/saheedniyi02/Naijaweb), kindly give a star ⭐.
## Data Cleaning

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.

### Data Cleaning Procedure:
- **URL Filtering** 
- **Repitition and quality filtering:**
- **Personal Identifiable Information (PII) Removal** 

## Example Entry

Each data point contains the following fields:
- `text`: the main body of the post or web page
- `link`: the original URL of the source content
- `token_count`: the number of GPT2 tokens in the `text` field
- `section`: the Nairaland section where the post was found
- `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)
- `language`: detected language of the text (e.g., `en`, `yo`, `ha`, `ig`)
- `language_probability`: the confidence score of the language detection algorithm

An example looks as follows:
```
{
 'text': 'Between a general and a president\nDwight Eisenhower was the four-star general of the United States army who went on to become the 34th president of the country after a blazing military career that saw him take charge of the Allied Forces during World War 2. His time as the supreme commander of the expeditionary forces in Western Europe oversaw the successful allied attack on the shore of Normandy a year before the end of the global conflict. Under Eisenhower, Western Europe was freed from the grip of the Nazis. Later, this American soldier fondly called Ike, took his place in history as he accepted Germany’s surrender and moved on to command the US occupation zone in Germany.\nBut, according to a BBC profile, Ike wasn’t done with mere military triumphs. BBC writes: “In 1952, the popularity which Eisenhower had gained during the war helped him win the Republican nomination for presidency and then the presidency itself. His time in office was dominated by the Cold War. In July 1953, he agreed to an armistice to end the fighting in Korea… Eisenhower was re-elected in November 1956.’’\nThe historian H. A. Davies in his book, An Outline History of the World, adds more of the outstanding feats of the Eisenhower presidency: it expanded the American nation by admitting Alaska and Hawaii into the Union to bring the number of America’s states to 50. At a critical point when race relations got to a boiling stage, Ike sent fully kitted paratroopers to enforce a Supreme Court ruling on desegregation in a school in one of the states.\nBut although Eisenhower’s flight to fame found its cradle in the military, Americans and observers of contemporary history have shrouded him in ‘presidential’ robes, hardly in military drill. For, they believe, as Ike himself did when, after a victorious military campaign, he chose to go into politics; that you serve your people best on the platform of their summons through the ballot box.\nSo all through his two-term presidency that ended in 1961 and paved the way for JF Kennedy, Ike was never referred to as General Eisenhower. It was President Eisenhower. To be sure, he struck great feats as a soldier. But his martial accomplishments couldn’t take him where the presidency took him. The presidency took him to the abode of the gods on Mount Olympus, whereas his generalship held him to the ground. Eisenhower himself never sought a look into that past. For it would remind him of a discarded past, a yesterday that reminded him of a period he thirsted for fulfillment. Who would wish for a baneful past in a pleasant present? If then, the media or citizenry should take it upon themselves to dress Eisenhower in his old military garment, it would amount to driving him from the present to yesterday. It would be penalty for perceived breach of a sacred duty.\nThat is the bold point The PUNCH newspaper group was making when it announced that its titles were no longer obligated to address Muhammadu Buhari as president in view of his government’s ‘’assaults on the courts, disobedience of court orders and arbitrary detention of citizens .’’ The newspaper declared in its famous editorial with the title, Buhari’s lawlessness: Our stand:’’ As a symbolic demonstration of our protest against autocracy and military-style repression, PUNCH (all our print newspapers, The PUNCH, Saturday PUNCH, Sunday PUNCH, PUNCH Sports Extra, digital platforms, most especially Punchng.com) will henceforth prefix Buhari’s name with his rank as a military dictator in the 80s, Major General, and refer to his administration as a regime, until they purge themselves of their insufferable contempt for the rule of law.’’\nBuhari’s media gaffers and all the others rising to lambast the newspaper understand what it translates into to disconnect an old soldier from his new-found presidential love and return him to his ancient habits.\nIt’s real term demotion. It does greatly matter, contrary to what one of the media aides says. There’s something in a name in this case. A name announces who you are. It also announces who you are not, which is more important, if you ask me. If you are an elected president, donning presidential apparel but your gait, outlook, vision and conversation are incongruent with presidential appurtenances, you are a pretender. I should be worried that I am not dealing with the real man. The hood doesn’t make the monk. The hood and monk must come together to make the monk. The hood without the monk is a pretense, a profanity, a pariah. A man and his presidency must abide in the same boat. They can’t be Dr. Jekyll and Mr. Hyde.\nThose hitting The PUNCH hard understand what is at play. The newspaper understands too. It is the reason it has decided to take such a strong position. It is a fulfillment of the media’s solemn pledge to protect the people when the other bulwarks of preservation of the land crumble or are cowed into acquiescence. There must be voices to stand up in defence of society.\nOne of such voices has been Wole Soyinka, who himself has lately been recuperating from a blistering shock at Buhari’s ‘lackluster performance’. The Nobel Laureate was among the main characters that created Buhari. That’s where it pains, that what you labour to bring into being turns at you to destroy you and your community. So days before PUNCH, Soyinka began the psychological war that employs titles and prefixes to challenge leaders. Knowing how madly we adore titles, Soyinka, exasperated with the way the Omoyele Sowore has been handled by the Buhari regime, addressed the Nigerian leader thus: President-General Buhari.\nDid we notice what Soyinka was up to? He refused the president his full regalia to protest his ‘desecration’ of the judiciary when operatives of the executive were running rings around court rulings. So he, Wole Soyinka, master of literary language, also drew a circle of words around our beloved president: President-General Buhari.\nPray, what does it mean? Splitting one man into two: a general and a president! I wonder why those at The Presidency didn’t notice it to summon Soyinka to the Villa for questioning. Or did they?',
 'link': 'https://thenationonlineng.net/between-a-general-and-a-president/',
 'token_count': 1370,
 'section': 'Politics',
 'int_score': 3,
 'language': 'en',
 'language_probability': 0.9999847412109375
}
```

## How to Load the Dataset

To load the dataset using Hugging Face's `datasets` library:

```python
from datasets import load_dataset

dataset = load_dataset("saheedniyi/naijaweb-edu")
```

## Social Impact

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**.

## Bias and Ethical Considerations

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.

## Sections of the Dataset

The dataset comprises content from 19 different sections of **Nairaland.com**, covering topics such as **Politics**, **Education**, **Business**, and **Health**.

Citation
If you use the Naijaweb-edu dataset in your research, please cite it as follows:

Citation
If you use the Naijaweb dataset in your research, please cite it as follows:
```
@dataset{naijawebedu_2024,
  author    = {Saheed Azeez},
  title     = {Naijaweb-Edu: A Web Scraped Nigerian Context Dataset},
  year      = {2024},
  publisher = {Hugging Face Datasets},
  version   = {1.0.0},
  url       = {https://huggingface.co/datasets/saheedniyi/naijaweb-edu},
}
```