Translation Into Definite Clauses
DCG notation is just syntactic sugar for normal definite clauses in Prolog. For example, the previous example could be translated into the following:
sentence(S1,S3) :- noun_phrase(S1,S2), verb_phrase(S2,S3). noun_phrase(S1,S3) :- det(S1,S2), noun(S2,S3). verb_phrase(S1,S3) :- verb(S1,S2), noun_phrase(S2,S3). det(, X). det(, X). noun(, X). noun(, X). verb(, X).Read more about this topic: Definite Clause Grammar
Famous quotes containing the words translation and/or definite:
“Translation is the paradigm, the exemplar of all writing.... It is translation that demonstrates most vividly the yearning for transformation that underlies every act involving speech, that supremely human gift.”
—Harry Mathews (b. 1930)
“The artistic temperament is a disease that affects amateurs.... Artists of a large and wholesome vitality get rid of their art easily, as they breathe easily or perspire easily. But in artists of less force, the thing becomes a pressure, and produces a definite pain, which is called the artistic temperament.”
—Gilbert Keith Chesterton (18741936)