title: Simple Natural Language Parser in Objective-C
body: <p>I'm building this app for Mac OS X v10.6</p>
  
  <p>I'm building a text-based adventure and I've created a very simple natural language parser that can process the commands that the user types. So far it works great and can parse sentences such as: "take the sword" or "look in the box"</p>
  
  <p>What I'm trying to do is create a list of aliases for different words to make typing commands less strict. So for example "take" could have an alias of "grab" or "go" could have the aliases "move, walk, or travel"</p>
  
  <p>I've tried creating an NSDictionary where the key was the word and the value was an NSArray of aliases. The problem was that when determining if the command entered matched an available command, I would have to reference the aliases with the word that was used for the key.</p>
  
  <p>I want to be able to use any of the aliases to reference any of the other aliases. Does anyone know of a good way to do that?</p>
  
  <p>Another thought I had (but it seems to inefficient) is to store each set of aliases in an array. When parsing I would find the array that contains the word I want to match and try to match all the other words in that array against it.</p>