Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
File size: 5,885 Bytes
17f5694
aed372c
 
32fa5d0
aed372c
 
32fa5d0
 
aed372c
 
 
 
32fa5d0
20384c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f98dbd
 
20384c4
 
 
3f98dbd
 
 
9f90158
3f98dbd
20384c4
32fa5d0
5764332
 
32fa5d0
 
 
 
 
 
 
 
 
 
 
 
 
 
5764332
32fa5d0
 
5764332
32fa5d0
4a51c88
5764332
32fa5d0
4a51c88
5764332
32fa5d0
20384c4
 
 
 
 
 
3f98dbd
 
32fa5d0
 
 
 
 
 
4a51c88
 
17f5694
aed372c
 
 
 
 
 
 
e02b8f0
aed372c
 
 
 
 
 
e02b8f0
aed372c
 
e02b8f0
aed372c
 
e02b8f0
aed372c
 
 
e02b8f0
 
 
 
38c1005
e02b8f0
 
 
 
 
 
38c1005
e02b8f0
 
aed372c
 
bae95b4
aed372c
bae95b4
 
 
 
 
 
 
 
aed372c
bae95b4
aed372c
 
 
 
bae95b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aed372c
 
 
 
e02b8f0
29753d6
 
 
 
 
 
bae95b4
29753d6
 
 
 
 
 
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
language:
- en
license: mit
size_categories:
- 1K<n<10K
task_categories:
- text-generation
tags:
- math world problems
- math
- arithmetics
dataset_info:
- config_name: default
  features:
  - name: id
    dtype: string
  - name: question
    dtype: string
  - name: chain
    dtype: string
  - name: result
    dtype: string
  - name: result_float
    dtype: float64
  - name: equation
    dtype: string
  - name: expression
    dtype: string
  splits:
  - name: train
    num_bytes: 298347
    num_examples: 1089
  - name: validation
    num_bytes: 285321
    num_examples: 1040
  - name: test
    num_bytes: 142648
    num_examples: 520
  download_size: 0
  dataset_size: 726316
- config_name: original-splits
  features:
  - name: id
    dtype: string
  - name: question
    dtype: string
  - name: chain
    dtype: string
  - name: result
    dtype: string
  - name: result_float
    dtype: float64
  - name: equation
    dtype: string
  - name: expression
    dtype: string
  splits:
  - name: train
    num_bytes: 1000546
    num_examples: 3636
  - name: test
    num_bytes: 142648
    num_examples: 520
  - name: validation
    num_bytes: 285321
    num_examples: 1040
  download_size: 128730
  dataset_size: 1428515
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
- config_name: original-splits
  data_files:
  - split: train
    path: original-splits/train-*
  - split: test
    path: original-splits/test-*
  - split: validation
    path: original-splits/validation-*
---


# Dataset Card for Calc-MAWPS


## Summary

The dataset is a collection of simple math word problems focused on arithmetics. It is derived from <https://huggingface.co/datasets/omarxadel/MaWPS-ar>.

The main addition in this dataset variant is the `chain` column. It was created by converting the solution to a simple html-like language that can be easily
parsed (e.g. by BeautifulSoup). The data contains 3 types of tags:

- gadget: A tag whose content is intended to be evaluated by calling an external tool (sympy-based calculator in this case)
- output: An output of the external tool
- result: The final answer to the mathematical problem (a number)


## Supported Tasks

This variant of the dataset is intended for training Chain-of-Thought reasoning models able to use external tools to enhance the factuality of their responses.
This dataset presents in-context scenarios where models can outsource the computations in the reasoning chain to a calculator.



## Data splits

We provide 2 variants of the dataset. In the first one, the data splits correspond to the original one and can be loaded using:

```python
datasets.load_dataset("MU-NLPC/calc-mawps", "original-splits")
```

The second one is filtered to prevent data leaks (overly similar examples in train and test/val splits) in between and across datasets in [Calc-X collection](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483).
Specifically, we filtered out around 2,500 near-duplicates from the train set that were similar to some instances in the MAWPS val and test splits and ASDiv-A test split. You can load this variant via:

```python
datasets.load_dataset("MU-NLPC/calc-mawps")
```


## Attributes:

- **id**: id of the example
- **question**: problem description in English
- **question_arabic**: problem description in Arabic
- **chain**: series of simple operations (derived from **expression**) that lead to the solution
- **result**: the solution for x as a number or fraction (string)
- **result_float**: same as `result` but converted to a float
- **equation**: an equation that needs to be solved for `x` to obtain the result. Usually in the form of "x = ..." but not always.
- **expression**: arithmetic expression derived from `equation` that solves it for `x`

Attributes **id**, **question**, **chain**, and **result** are present in all datasets in [Calc-X collection](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483).


## Related work

This dataset was created as a part of a larger effort in training models capable of using a calculator during inference, which we call Calcformers.

- [**Calc-X collection**](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483) - datasets for training Calcformers
- [**Calcformers collection**](https://huggingface.co/collections/MU-NLPC/calcformers-65367392badc497807b3caf5) - calculator-using models we trained and published on HF
- [**Calc-X and Calcformers paper**](https://arxiv.org/abs/2305.15017)
- [**Calc-X and Calcformers repo**](https://github.com/prompteus/calc-x)

Here are links to the original dataset:

- [**original MAWPS dataset**](http://lang.ee.washington.edu/MAWPS)
- [**MAWPS dataset variant in Arabic**](https://huggingface.co/datasets/omarxadel/MaWPS-ar)
- [**original MAWPS paper**](https://aclanthology.org/N16-1136/)
- [**original MAWPS repo**](https://github.com/sroy9/mawps)


## Licence

MIT, consistent with the original source dataset linked above.


## Cite

If you use this version of the dataset in research, please cite the original [MAWPS paper](https://aclanthology.org/N16-1136/), and [Calc-X paper](https://arxiv.org/abs/2305.15017) as follows:

```bibtex
@inproceedings{kadlcik-etal-2023-soft,
    title = "Calc-X and Calcformers: Empowering Arithmetical Chain-of-Thought through Interaction with Symbolic Systems",
    author = "Marek Kadlčík and Michal Štefánik and Ondřej Sotolář and Vlastimil Martinek",
    booktitle = "Proceedings of the The 2023 Conference on Empirical Methods in Natural Language Processing: Main track",
    month = dec,
    year = "2023",
    address = "Singapore, Singapore",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/2305.15017",
}
```