Definite Clause Grammars for Language Analysis - A Survey of the Formalism and a Comparison with Augmented Transition NetworksFernando C. N. Pereira and David H. D. WarrenPresentation by Petru REBEJA
Mind map
An extension of Context Free Grammars (CFG) expressed in definite clausesEach rule is a “syntactic sugar” for a definite clause of logicDCGs - Introduction
Extended from CFG specifying that:Non-terminals can be terms not only atomsnp(X,S) sentence(S)Procedure calls in the RHS of a rule enclosed within ‘{‘ and ‘}’noun(N) -> [W], {rootform(W,N), is_noun(N)}.DCGs - Formalism
sentence( s(NP, VP) ) ->noun_phrase(NP), verb_phrase(VP).noun_phrase(np(Det,Noun,Rel) )-> determiner(Det), nounI.Noun),rel_clause(Rel).noun_phrase(np(Name) ) -> name(Name).verb_phrase(vp(TV,NP) ) -> trans_verb(TV), noun_phrase(NP).verb_phrase(vp(IV) ) -> intrans_verb(IV).rel_clause(rel(that,VP) ) -> [that], verb_phrase(VP).rel_clause(rel(nil) ) -> [].determiner(det(W) ) -> [W], {is_determiner(W)}.noun(n(W) ) -> [W], {is_noun(W)}.name(name(W) ) -> [W], {is_name(W)}.trans_verb(tv(W) ) -> [W], {is_trans(W)}.intrans_verb(iv(W) ) -> [W], {is_intrans(W)}.DCG - Example
DCG – Example (cont)
Finite state machine (Markov model)Adds to each arc of the network an arbitrary condition which must be satisfied in order for the arc to be followedATNs - Introduction
ATNs - ExampleDefinition of the network(defnode s  (cat noun s2       (setrsubj *)))(defnode s2  (cat verb s3       (setr v *)))(defnode s3  (up `(sentence	(subject ,(getrsubj))	(verb ,(getr v)))))Sample output(sentence 	(subject spot) 	(verb runs)) For more details visit http://www.bookshelf.jp/texi/onlisp/onlisp_24.html
Perspicuity – not only a machine for analyzing, but also a description of the languagePower and generality – more powerful mechanism for building structuresConciseness – around half size of ATNAdvantages of DCG
Efficiency – DCG – 8 msec./word; ATN – 34 msec./wordFlexibility – DCG is in no way tied to a particular parsing/execution mechanismSuitability for theoretical work – provide a bridge between the work of theoretical linguists and the work of engineersAdvantages of DCG (cont)
F.Pereira, D. Warren, Definite Clause Grammars for Language Analysis--A Survey of the Formalism and a Comparison with Augmented Transition Networks, 1980A. Woods, Augmented Transition Networks for Language Analysis, 1970http://www.bookshelf.jp/texi/onlisp/onlisp_24.htmlReferences
Definite Clause Grammars For Language Analysis

Definite Clause Grammars For Language Analysis

  • 1.
    Definite Clause Grammarsfor Language Analysis - A Survey of the Formalism and a Comparison with Augmented Transition NetworksFernando C. N. Pereira and David H. D. WarrenPresentation by Petru REBEJA
  • 2.
  • 3.
    An extension ofContext Free Grammars (CFG) expressed in definite clausesEach rule is a “syntactic sugar” for a definite clause of logicDCGs - Introduction
  • 4.
    Extended from CFGspecifying that:Non-terminals can be terms not only atomsnp(X,S) sentence(S)Procedure calls in the RHS of a rule enclosed within ‘{‘ and ‘}’noun(N) -> [W], {rootform(W,N), is_noun(N)}.DCGs - Formalism
  • 5.
    sentence( s(NP, VP)) ->noun_phrase(NP), verb_phrase(VP).noun_phrase(np(Det,Noun,Rel) )-> determiner(Det), nounI.Noun),rel_clause(Rel).noun_phrase(np(Name) ) -> name(Name).verb_phrase(vp(TV,NP) ) -> trans_verb(TV), noun_phrase(NP).verb_phrase(vp(IV) ) -> intrans_verb(IV).rel_clause(rel(that,VP) ) -> [that], verb_phrase(VP).rel_clause(rel(nil) ) -> [].determiner(det(W) ) -> [W], {is_determiner(W)}.noun(n(W) ) -> [W], {is_noun(W)}.name(name(W) ) -> [W], {is_name(W)}.trans_verb(tv(W) ) -> [W], {is_trans(W)}.intrans_verb(iv(W) ) -> [W], {is_intrans(W)}.DCG - Example
  • 6.
  • 7.
    Finite state machine(Markov model)Adds to each arc of the network an arbitrary condition which must be satisfied in order for the arc to be followedATNs - Introduction
  • 8.
    ATNs - ExampleDefinitionof the network(defnode s (cat noun s2 (setrsubj *)))(defnode s2 (cat verb s3 (setr v *)))(defnode s3 (up `(sentence (subject ,(getrsubj)) (verb ,(getr v)))))Sample output(sentence (subject spot) (verb runs)) For more details visit http://www.bookshelf.jp/texi/onlisp/onlisp_24.html
  • 9.
    Perspicuity – notonly a machine for analyzing, but also a description of the languagePower and generality – more powerful mechanism for building structuresConciseness – around half size of ATNAdvantages of DCG
  • 10.
    Efficiency – DCG– 8 msec./word; ATN – 34 msec./wordFlexibility – DCG is in no way tied to a particular parsing/execution mechanismSuitability for theoretical work – provide a bridge between the work of theoretical linguists and the work of engineersAdvantages of DCG (cont)
  • 11.
    F.Pereira, D. Warren,Definite Clause Grammars for Language Analysis--A Survey of the Formalism and a Comparison with Augmented Transition Networks, 1980A. Woods, Augmented Transition Networks for Language Analysis, 1970http://www.bookshelf.jp/texi/onlisp/onlisp_24.htmlReferences