One of the most common points of skepticism I face from people is the notion that computers can understanding anything. Meaning, they presume, is the province of human thought and not mechanical computation. Even as conversational assistants like Siri, Watson and Google Now have reached mainstream usage, the numerous failures in machine understanding serve to reinforce in their mind humanity's unique gift of understanding.
It turns out that the meaning of natural language and computer programs can be modeled through formal semantics. The meaning of computer programs are modeled through formalisms like lambda calculus and modal logic. The meaning of natural language texts are modeled through predicate logic, natural semantics or description logic. Modal logic adds support for notions of belief, necessity, knowledge, and ethics. Tense logic, situation calculus, and event calculus incorporate notions of time and sequence of actions.
Representing the meaning of a sentences in natural language is difficult for linguistic reasons rather computational reasons. Natural language is very imprecise, irregular, ambiguous and dependent on context. There are many resources that help such as machine readable dictionaries like WordNet, commonsense databases like ConceptNET, linguistic corpora, and language resources like VerbNet, FrameNet, and ComLex.
My company is working on understanding both computer programs and natural language and using a proprietary and efficient reasoning system to draw conclusions. The work that I do with natural language focuses primarily on manipulating syntax. It could, for example, convert a noun phrase to it equivalent verb phrase. Semantic information is obtained and used opportunistically, since that information is error-prone to gather.
There are many companies and organizations working on semantic. There is an effort on building a semantic web based on RDF. Companies like Semantic Designs are working on converting software programs. Google is developing a Knowledge graph of the world. Other efforts include CYC.
Some books on the programming language and natural language semantics are below:
Understanding Natural Language
- Chierchia, Gennaro and Sally McConnell-Ginet. Meaning and Grammar: Introduction to Semantics. Cambridge: MIT Press, 2000. Print.
- Pereira, Fernando and Stuart Shieber. Prolog and Natural Language Analysis. Brookline: Microtome Publishing, 2002. Print.
- Allen, James. Natural Language Understanding. Redwood City: Benjamin/Cummings Publishing, 1995. Print.
- Schmidt, David. Denotational Semantics: A Methodology for Language Development. <http://people.cis.ksu.edu/~schmidt/text/densem.html.>
- Huth, Michael and Mark Ryan. Logic in Computer Science: Modeling and Reasoning about Systems. Cambridge: Cambridge Univ Press, 2004.