A. C. Brett firstname.lastname@example.org
Department of Linguistics
University of Victoria
Atoms are often represented by sequences of one or more lower case letters; but, they can include both upper case letters and numbers as well as underscore characters, "_", and dollar signs, "$". The sequence of characters must begin, however, with a lower case letter.
The particular sequences of characters used to represent atoms are often determined by the domain or application with which one is working. For example, if you are working with a natural language, many of the atoms will correspond to the words of the language such as the following:
i visited cape_St_James for ten$sOther atoms might be chosen to correspond to category labels, features, and feature values such as the following:
verb_phrase v vform case accAtoms may also be represented by any sequence of characters as long as they are enclosed in apostrophes (single quote marks) such as the following:
'Cape St. James' '$10.00' 'NP' 'DET' 'VFORM'This device is convenient for representing data objects such as proper nouns that begin with upper case letters or include special characters; but, it is incovenient for identifying atoms that serve as names in a program. Hence, atoms used as category labels are normally represented with the corresponding lower case letter sequences such as
np det noun verbThe Prolog interpreter attaches no meaning to the particular sequences employed to represent atoms beyond their serving to identify, and distinguish among individual data elements and names. Thus, except for those circumstances wherein you might be constrained by the data with which you are working, you are free to select any sequences of characters to represent atoms that are meaningful to you, subject of course to the representation rules cited above.
Atoms can take the role data values, such as the words of a natural language, or values of the features that might characterise the words, in a natureal language processing program. Atoms can also be used to construct more complex entities in the Prolog language such as structures.
In addition to the atoms with the representations described above, there are some special atoms that are represented by characters or character sequences such as, for example, "+", "=", "-", "\=", and "@<". Such atoms serve as the names of operators.
|Linguistics 482||Prolog Introductory Notes||Top of Page|