Machine Learning for Automatic Word Problem Solving