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:
“Well meant are the wounds a friend inflicts, but profuse are the kisses of an enemy.”
—Bible: Hebrew, Proverbs 27:6.
KJ translation reads: Faithful are the wounds of a friend.
“... life cannot be administered by definite rules and regulations; that wisdom to deal with a mans difficulties comes only through some knowledge of his life and habits as a whole ...”
—Jane Addams (18601935)