abokbot commited on
Commit
57797cf
1 Parent(s): 1ef024a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -18
README.md CHANGED
@@ -1,21 +1,44 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: id
5
- dtype: string
6
- - name: url
7
- dtype: string
8
- - name: title
9
- dtype: string
10
- - name: text
11
- dtype: string
12
- splits:
13
- - name: train
14
- num_bytes: 2375319060
15
- num_examples: 6458670
16
- download_size: 1387720232
17
- dataset_size: 2375319060
18
  ---
19
- # Dataset Card for "wikipedia-first-paragraph"
20
 
21
- [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
 
5
 
6
+ # Dataset Description
7
+
8
+ This dataset contains the first paragraph of cleaned Wikipedia articles in English.
9
+
10
+ It was obtained by transorming the Wikipedia "20220301.en" dataset as follows:
11
+ ```python
12
+ from datasets import load_dataset
13
+
14
+ dataset = load_dataset("wikipedia", "20220301.en")["train"]
15
+
16
+ def get_first_paragraph(example):
17
+ example["text"] = example['text'].split('\n\n')[0]
18
+ return example
19
+
20
+ dataset = dataset.map(get_first_paragraph)
21
+ ```
22
+ # How to load dataset
23
+
24
+ You can load it by runnning:
25
+ ```python
26
+ from datasets import load_dataset
27
+
28
+ load_dataset("abokbot/wikipedia-first-paragraph")
29
+
30
+ ```
31
+
32
+ # Dataset Structure
33
+ An example looks as follows:
34
+ ```
35
+ {
36
+ 'id': '124',
37
+ 'url': 'https://simple.wikipedia.org/wiki/European%20Council',
38
+ 'title': 'European Council',
39
+ 'text': 'The European Council (referred to as a European Summit) is the highest political body of the European Union. \
40
+ It is made of all the heads of state or government of the Union's member states and with the President of the \
41
+ European Commission. The country which holds the Presidency of the Council of the European Union also leads its assemblies.'
42
+ }
43
+ ```
44
+