Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 

End-to-End Math Solver

The implementation of the NAACL 2019 paper Semantically-Aligned Equation Generation for Solving and Reasoning Math Word Problems.

Usage

  1. Download required files:
  2. Preprocess dataset:
cd src/
mkdir ../data/
python make_train_valid.py ~/storage/MWP/data/math23k_fix.json ~/storage/cc.zh.300.vec ../data/train_valid.pkl --valid_ratio 0 --char_based

Note that the warning is not unexpected, because some of the problems use operator out of +, -, *, /. The purpose of the flags are as follow:

  • --valid-ratio 0: Set the ratio the validation dataset should take. It should be set to 0 when running 5-fold cross validation.
  • --char_based: Specify if you want to tokenize the problem text into characters rather into words.
  1. Start 5-fold cross-validation by
mkdir ../models
python train.py ../data/train_valid.pkl ../models/model.pkl --five_fold

About

Implementation of NAACL 2019 paper "Semantically-Aligned Equation Generation for Solving and Reasoning Math Word Problem"

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages