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