title: what is the best way to understand the user's query?
body: <p>In my java project, I need to classify the users natural language query under three categories: </p>
  
  <ol>
  <li>Add some tuples to the database. </li>
  <li>Delete some tuples from the database</li>
  <li>Create new table</li>
  </ol>
  
  <p>The user query will be something like: "Please Add the user Jhon who was born on 1999" if we supposed that this is the only needed information to be added.</p>
  
  <p>What is best way to understand the semantic of such sentence hence perform the proper action.</p>
  
  <p>I know I can deal with it within my code by creating an array for the words that means "ADD" or "DELETE" then send the query to the class that deals with addition or deletion.</p>
  
  <p>But I don't want to solve it this way, I thought of finding the synonym of the word from wordnet but that was not helpful as one of the synonym of delete is edit which needs a different reaction. </p>
  
  <p>I want something more like NLP and Semantic processing.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks in Advance</p>