title: Algorithms for Natural Language Understanding
body: <p>I wanted to know what algorithms I could use for NLU?</p>
  <p>For example, let's say I want to start a program, and I have these sentences</p>
  <blockquote>
  <p>&quot;Let us start&quot;</p>
  <p>&quot;Let him start&quot;</p>
  </blockquote>
  <p>Obviously, the first sentence should start the program, but not the second one (since it doesn't make sense).</p>
  <p>Right now, I have am using Stanford's NLP API and have implemented the TokenRegexAnnotator class:</p>
  <pre><code>CoreMapExpressionExtractor&lt;MatchedExpression&gt; extractor = CoreMapExpressionExtractor.createExtractorFromFile(env, &quot;tr.txt&quot;);
  </code></pre>
  <p>So my code &quot;knows&quot; what &quot;Start&quot; should do, that is, &quot;Start&quot; should trigger/start the program. But &quot;Start&quot; could be used with anything, like &quot;Start the car.&quot; In this case, I wouldn't want to &quot;Start&quot; the program because the sentence is about starting a car, not the program. To solve this, I used Stanford's CollapsedDependenciesAnnotation class:</p>
  <pre><code>SemanticGraph dependencies = s.get(CollapsedDependenciesAnnotation.class);
  Iterable&lt;SemanticGraphEdge&gt; edge_set = dependencies.edgeIterable();
  </code></pre>
  <p>I used the <code>nsubj</code> dependency to see if the subject was a <code>PRP</code> (pronoun) since I want the program to start only when the subject is a <code>PRP</code>. So when I inputed the sentence &quot;let us start&quot; in my program, the program started. However, when I inputed the sentence &quot;Start the car,&quot; the program didn't start. All is working well...</p>
  <p>BUT the program will also start when I input the sentence &quot;Let him start&quot; (as mentioned above). (It starts because &quot;him&quot; is also a pronoun). I do not want the program to start when I input this sentence (because &quot;Let him start&quot; has nothing to do with the starting the program). So how will the program know this? What can I do to solve this problem? Are there algorithms that will let the computer differentiate between &quot;let us start&quot; and &quot;let him start&quot;?</p>
  <p>Any ideas on how to solve this problem?</p>
  <p>Thank you!</p>
  <p>(I hope I am being clear)</p>