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.
“Slowly, and in spite of anything we Americans do or do not do, it looks a little as if you and some other good people are going to have to answer the old question of whether you want to keep your country unshackled by taking even more definite steps to do soeven firing shotsor, on the other hand, submitting to be shackled for the sake of not losing one American life.”
—Franklin D. Roosevelt (18821945)