Definite Clause Grammars For Language Analysis

1,139 views

Published on

Paper presentation

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,139
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Definite Clause Grammars For Language Analysis

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

×