File size: 4,182 Bytes
fde51c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7b9d94e
fde51c6
 
7b9d94e
fde51c6
 
 
 
 
7b9d94e
 
 
 
 
 
 
 
 
 
 
fde51c6
7b9d94e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: title
    dtype: string
  - name: text
    dtype: string
  - name: formulas
    list:
    - name: math_id
      dtype: int64
    - name: text
      dtype: string
  - name: url
    dtype: string
  splits:
  - name: train
    num_bytes: 309420055
    num_examples: 38661
  download_size: 157180903
  dataset_size: 309420055
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
license: cc-by-4.0
task_categories:
- text-generation
language:
- en
tags:
- math
- latex
pretty_name: enwikimath
size_categories:
- 10K<n<100K
---

# Dataset Card

This dataset is created from the English Wikipedia dump file (enwiki-20240901-pages-articles-multistream.xml.bz2), available for download from [Wikimedia Dumps](https://dumps.wikimedia.org/). It includes pages containing mathematical content, extracted using [the wikimathextractor tool](https://github.com/s-kat0/wikimathextractor), which is an adaptation of [the wikiextractor](https://github.com/attardi/wikiextractor) specifically designed to extract mathematical contents.


### Dataset Description

- **Curated by:** Shota Kato
- **Language(s) (NLP):** English
- **License:** CC-BY-SA 4.0


### Dataset Sources

- **Repository:** [s-kat0/wikimathextractor](https://github.com/s-kat0/wikimathextractor)
- **Data Source:** [Wikipedia Dumps](https://dumps.wikimedia.org/)


### Direct Use

This dataset is intended for use in tasks that require the processing and understanding of mathematical content in natural language, such as mathematical question answering and symbolic math problem solving.


## Dataset Structure

### Data Instances

A typical data entry in the dataset corresponds to one Wikipedia article that includes mathematical content. Here is an example:

```python
{
  'id': '26513034',
  'title': 'Pythagorean theorem',
  'text': 'Relation between sides of a right triangle\nIn mathematics, the Pythagorean theorem or Pythagoras\' theorem is a fundamental relation in Euclidean geometry between the three sides of a right triangle. ...'
  'formulas': [
    {'math_id': 0, 'text': 'a^2 + b^2 = c^2 .'},
    {'math_id': 1, 'text': 'a + b'}, ...
  ],
  'url': 'https://en.wikipedia.org/wiki?curid=26513034'
}
```

### Data Fields

- id (str)
    - a string representing the unique identifier of the article.
- title (str)
    - the title of the Wikipedia article.
- text (str)
    - the text content of the article, with some tags removed. Details are available in [the GitHub repository](https://github.com/s-kat0/wikimathextractor).
- formulas (list[dict[str, int | str]])
    - a list of mathematical expressions extracted from the article, where each formula is represented as follow.
        - math_id: an index representing the position of the formula in the text.
        - text: the textual representation of the formula, without <math> tags.
- url (str)
    - the URL of the Wikipedia article.


### Data Splits

The dataset is provided in a single training split:

- train: 38,661 rows

The `DatasetDict` structure is as follows:

```python
DatasetDict({
    'train': Dataset({
        features: ['id', 'title', 'text', 'formulas', 'url'],
        num_rows: 38661
    })
})
```

## Dataset Creation

Please refer to [the GitHub repository](https://github.com/s-kat0/wikimathextractor) for details about the dataset construction.


### Source Data

- **Original Source:** English Wikipedia available from [Wikipedia Dumps](https://dumps.wikimedia.org/)


#### Data Collection and Processing

Please refer to [the GitHub repository](https://github.com/s-kat0/wikimathextractor) for details about the dataset construction.

#### Who are the source data producers?

Shota Kato


## Bias, Risks, and Limitations

This dataset is in English and contains English Wikipedia page related to mathematical topics.


## Acknowledgements

This dataset was constructed with references to several projects and tools. Acknowledgement is given to the following resources:

- [attardi/wikiextractor](https://github.com/attardi/wikiextractor)
- [Hugging Face Datasets: hpprc/jawiki](https://huggingface.co/datasets/hpprc/jawiki)