title: How to store and check synonym of string in Java
body: <p>I'm making a program which can response to what user said, something like chatter bot. But I wonder if I can make it understand if two or more words have the same meaning. </p>
  
  <p>For example, I make it to answer, "yes" when user say "are you scared of the dark?". But "scared", "afraid", and "frightened" have the same meaning. If the user use "afraid" instead of "scared" how the program recognize those two words have equal meaning, hence make the reference to "are you scared of the dark?" question and answer "yes"?</p>
  
  <p>I wonder if I could make array of String like <code>{"hello", "hi", "hey"}</code> or <code>{"afraid", "scared", "frightened"}</code> etc. Thank you for helping.</p>
  
  <p>P.S: the program I wrote doesn't use English language, I'm afraid I can't use library or API because of that, but I have no problem defining the synonym list myself.</p>