title: Ways to take multiple variations of inputs to mean the same thing?
body: <p>I have to make a text based game in Java for uni and I want to let users use multiple command variations and multiple names for items/NPCs. Whats the best way to do this?</p>
  <p>For example, if i want people to go west i want people to be able to say
  &quot;Go west&quot; or &quot;Head West&quot; or &quot;Walk west&quot;, etc.</p>
  <p>I understand I can do this with just many of these:</p>
  <pre><code>if (command.equals(&quot;head&quot;) || command.equals(&quot;walk&quot;) || command.equals(&quot;travel&quot;) || command.equals(&quot;go&quot;))
  </code></pre>
  <p>but not only is this lengthy and ugly but with every single command, every single item and every single character it will become insanely long and inefficient. Is there any better way to do this that isn't insanely advanced? Thanks</p>