1 / 11

Formulation of Grammar And Parsing

CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 17 (14/03/06) Prof. Pushpak Bhattacharyya IIT Bombay. Formulation of Grammar And Parsing. Formulation of Grammar. Form a grammar which accepts - Joe is reading the book. Joe has won a letter. Joe has to win.

bryant
Download Presentation

Formulation of Grammar And Parsing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 17 (14/03/06)Prof. Pushpak BhattacharyyaIIT Bombay Formulation of Grammar And Parsing

  2. Prof. Pushpak Bhattacharyya, IIT Bombay Formulation of Grammar Form a grammar which accepts - • Joe is reading the book. • Joe has won a letter. • Joe has to win. • Joe will have the letter. • The letter in the book was red. • Joe could have had one.

  3. Prof. Pushpak Bhattacharyya, IIT Bombay Formulation of Grammar (Contd.1) And rejects – 1*. Joe has reading the book. 2*. Joe had win. 3*. Joe winning. 4*. Joe will had the letter. 5*. The book was won by Joe. 6*. Joe can have having one.

  4. Prof. Pushpak Bhattacharyya, IIT Bombay Solution (Considering NP) S  NP VP NP  Joe | the letter in the box | a letter | one NP  PN (proper noun) | DT N | NP PP | NQ (quantitative noun) PP  prep NP N  letter | box

  5. Prof. Pushpak Bhattacharyya, IIT Bombay Solution (Contd.) But the production rule NP  NP PP is left recursion. So we make it NP  DT N PP

  6. Prof. Pushpak Bhattacharyya, IIT Bombay Verb Forms Forming VP production rules require insight into verb forms – • VB – base form (bathe, go) • VBS – S form (bathes, goes) • VBD – D form, past tense (bathed, went) • VBG – -ing form, present participle (bathing, going) • VBN – N form, past participle (bathed, gone)

  7. Prof. Pushpak Bhattacharyya, IIT Bombay Solution (Considering VP) VP  is VBG NP | has VBN NP | has to VB | will VB NP | was AP (adjective phrase) | could have VBN NP AP  JJ (adjective)

  8. Prof. Pushpak Bhattacharyya, IIT Bombay Solution (Contd. 1) Introducing new non-terminals – AM_IS_WAS  am | is | was HAS_HAD  has | had MODAL  will | would | shall | should | can | could | may | might | must | ought to IS_WAS  is | was

  9. Prof. Pushpak Bhattacharyya, IIT Bombay Solution (Contd. 2) The VP rules are now changed as follows – VP  AM_IS_WAS VBG NP | HAS_HAD VBN NP | HAS_HAD to VB | MODAL VB NP | IS_WAS AP | MODAL have VBN NP Some more rules of VP can be – VP  HAS_HAD been VBG NP | MODAL have been VBG NP

  10. Prof. Pushpak Bhattacharyya, IIT Bombay Top-down Parsing for Sentence 1 1 Joe 2 is 3 reading 4 the 5 book 6 Topdown backup Action • ((S) 1) - - • ((NP VP) 1) - - • ((PN VP) 1) bkup exists - • ((VP) 2) - Joe • ((IS_WAS VBG NP) 2) bkup exists - • ((VBG NP) 3) - is • ((NP) 4) - reading • ((PN) 4) bkup exists -

  11. Prof. Pushpak Bhattacharyya, IIT Bombay Bottom-up Chart Parsing for Sentence 3 Joe has to win 1 2 3 4 5 NPPN VPHAS_HADVBN NP VPHAS_HAD toVB VPHAS_HAD to VB  S NP  VP VPHAS_HADto VB

More Related