Converting natural language to a math equation
问题 I've got a home automation system working in Java, and I want to add simple math capabilities such as addition, subtraction, multiplication, division, roots, and powers. At the system current state, it can convert a phrase into tags, as shown in the following examples: example: Phrase: "what is one hundred twenty two to the power of seven" Tagged: {QUESTION/math} {NUMBER/122} {MATH/pwr} {NUMBER/7} example: Phrase: "twenty seven plus pi 3 squared" Tagged: {NUMBER/27} {MATH/add} {NUMBER/3.14159