language:
- en
- ar
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.
Attributes:
id
: id of the examplequestion
: problem description in Englishquestion_arabic
: problem description in Arabicchain
: series of simple operations (derived fromexpression
) that lead to the solutionresult
: the solution for x as a number or fraction (string)result_float
: same asresult
but converted to a floatequation
: an equation that needs to be solved forx
to obtain the result. Usually in the form of "x = ..." but not always.expression
: arithmetic expression derived fromequation
that solves it forx
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:
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. 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:
datasets.load_dataset("MU-NLPC/calc-mawps")
Licence
MIT, consistent with the original source dataset linked above.
Related work
If you are interested in related datasets (or models), check out the MU-NLPC organization here on HuggingFace. We have released a few other datasets in a compatible format, and several models that use an external calculator during inference.
Cite
If you use this version of the dataset in research, please cite the original MAWPS paper, and Calc-X paper as follows:
@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 = december,
year = "2023",
address = "Singapore, Singapore",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/2305.15017",
}