Definite Clause Grammar - Translation Into Definite Clauses

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:

    Whilst Marx turned the Hegelian dialectic outwards, making it an instrument with which he could interpret the facts of history and so arrive at an objective science which insists on the translation of theory into action, Kierkegaard, on the other hand, turned the same instruments inwards, for the examination of his own soul or psychology, arriving at a subjective philosophy which involved him in the deepest pessimism and despair of action.
    Sir Herbert Read (1893–1968)

    Literature does not exist in a vacuum. Writers as such have a definite social function exactly proportional to their ability as writers. This is their main use.
    Ezra Pound (1885–1972)