abokbot's picture
Create README.md
57797cf
|
raw
history blame
1.17 kB
---
language:
- en
---
# Dataset Description
This dataset contains the first paragraph of cleaned Wikipedia articles in English.
It was obtained by transorming the Wikipedia "20220301.en" dataset as follows:
```python
from datasets import load_dataset
dataset = load_dataset("wikipedia", "20220301.en")["train"]
def get_first_paragraph(example):
example["text"] = example['text'].split('\n\n')[0]
return example
dataset = dataset.map(get_first_paragraph)
```
# How to load dataset
You can load it by runnning:
```python
from datasets import load_dataset
load_dataset("abokbot/wikipedia-first-paragraph")
```
# Dataset Structure
An example looks as follows:
```
{
'id': '124',
'url': 'https://simple.wikipedia.org/wiki/European%20Council',
'title': 'European Council',
'text': 'The European Council (referred to as a European Summit) is the highest political body of the European Union. \
It is made of all the heads of state or government of the Union's member states and with the President of the \
European Commission. The country which holds the Presidency of the Council of the European Union also leads its assemblies.'
}
```