Representing Features
Various linguistic features can also be represented fairly concisely with DCGs by providing extra arguments to the functors. For example, consider the following set of DCG rules:
sentence --> pronoun(subject), verb_phrase. verb_phrase --> verb, pronoun(object). pronoun(subject) --> . pronoun(subject) --> . pronoun(object) --> . pronoun(object) --> . verb --> .This grammar allows sentences like "he likes her" and "he likes him", but not "her likes he" and "him likes him".
Read more about this topic: Definite Clause Grammar
Famous quotes containing the words representing and/or features:
“... today we round out the first century of a professed republic,with woman figuratively representing freedomand yet all free, save woman.”
—Phoebe W. Couzins (18451913)
“It is a tribute to the peculiar horror of contemporary life that it makes the worst features of earlier timesthe stupefaction of the masses, the obsessed and driven lives of the bourgeoisieseem attractive by comparison.”
—Christopher Lasch (b. 1932)