A referring expression is any word or phrase whose purpose is to identify a particular person, place or thing. It is generally a noun, noun phrase or pronoun. In linguistics, identifying referring expressions and their relation to the real-world objects to which they refer is part of the study of pragmatics, which describes the relationship between language and the real-world situations that language describes. Referring expression generation is a subfield of natural language generation, which uses computers to produce text that mimics human language as closely as possible.
In grammatical terms, all nouns refer to people, places, things or ideas, but not all of them are referring expressions. For example, the sentence "A beagle is a breed of dog," contains three nouns: "beagle," "breed" and "dog." Each of these, however, refers to a class of things, rather than to any one specific thing, and so none are referring expressions. To phrase it differently, the purpose of the sentence is to give information about beagles in general rather than to direct the reader's attention to a particular beagle. On the other hand, in the sentence "That dog is a beagle," "that dog" is a referring expression because it points out a specific dog and gives information about it.
In English, a referring expression will often contain the definite article, "the," or a demonstrative pronoun such as "that" or "those," so that the phrase distinguishes a particular object from all other similar ones. For instance, the phrase "that mammoth" would clearly point out a particular mammoth and therefore be a referring expression, while "a mammoth" would not. Occasionally, however, the grammatical structure of a single sentence is not enough to determine whether a phrase is a referring expression. In the sentence "The mammoth ate primarily grasses," "the mammoth" might refer to a particular mammoth, or it might be a description of mammoths in general, depending on its context.
One practical application of pragmatics is natural language generation. To create referring expressions that clearly and unambiguously indicate the intended referent, natural language programmers must consider both grammatical and contextual issues. For instance, computer-generated language like human language should not contain any pronouns that could grammatically or logically refer to more than one noun or real-world object. In this way, referring expression generation is the flip-side of anaphora resolution, which uses various algorithms to determine the referents of pronouns in computer- or human-generated text.