Prolog Weeks 3-4: Natural Language to Predicate Calculus

Why bother?

The motivation for this translation comes from natural language understanding (NLU). We want machines to understand our languages, but they (or our theories) are currently inadequate for the job. For one, there's ambiguity. Which did the pronoun 'they' two sentences before refer to: 'machines' or 'languages'? In the arithmetic expression 1+1, there is one and only one way to evaluate it, and the result must be 2. But the sentence The man is funny may mean that he is funny (like Jim Carrey) or that he is scary (like a suspicious man who is actually a terrorist). Usually, we take the context into account to resolve ambiguity. For instance, in the context Jim Carrey is being discussed, the sentence has the former meaning, whereas in the context terrorism is being discussed, it has the latter meaning.

By translating a natural sentence into a crisp, solid logical form, we disambiguate its meaning. Furthermore, if we have logical formulas, then we can apply rules of logic such as modus ponens to make inferences. For example, if all computer courses are challenging, and CSC 173 is a computer course, then it follows logically that CSC 173 is challenging.

This turns out to be one way to tackle NLU. But, maybe you've already noticed, the translation part is not easy. After all, if one can disambiguate the meaning of every sentence flawlessly, what's so hard about NLU? The intrinsic randomness and whims of human languages render the translation 'plausible' at best. Recently, researchers are drawn to the idea that we can treat natural languages themselves as logical forms. This is pioneered by Montague, and this approach is known as Montague grammar. Still, most believe we need some adequate way to represent knowledge. Lenhart Schubert's episodic logic is one example of such representations.