Solving Algebraic Equations based on Word Problems