Abstract
Formal semantics is the study of linguistic meaning using precise mathematical characterizations; this chapter introduces formal semantics to scholars and students of natural-language processing. We give simple logical representations of English sentences, and show how meanings are composed in a grammar. We then consider two more advanced issues that arise in processing texts, anaphora and temporality, using Discourse Representation Theory. Finally we discuss the relationship between deep logic-based methods for semantic analysis and shallower distributional methods that have been used in much recent NLP work, introducing some limitations of distributional methods, and hence motivating deeper or hybrid approaches.