..........................................NEXT PREVIOUS INDEX
L01 CFG: English CF Grammar rules CONTEXT-FREE GRAMMAR FOR ENGLISH o WRITING A TOY ENGLISH GRAMMAR: Context free grammar or (a restricted) phrase structure grammar + An example grammar given below. The first rule says that a sentence (S) consists of a noun-phrase (NP) and a verb phrase (VP): - S -> NP VP - NP -> det adj* n - NP -> n-proper - VP -> v [NP] [NP] PP* - PP -> prep NP where: + NP: noun phrase (Ex. the red block, a sharp arrow) + VP: verb phrase (Ex. lifted the red block, fired an arrow) + PP: preposition phrase (Ex. with hands, at the deer) - n: noun (Ex. boy, child, arrow, block) - n-proper: proper noun (Ex. Ram, Mohan) - v: verb (Ex. lift, fire, give) - det: determiner (Ex. a, the) - adj: adjective (Ex. big, red, sharp) o EXAMPLE PHRASE STRUCTURE TREE: The boy fired the arrow. S | .----------. | | NP VP | | .---. .-------. | | | | det n v NP | | | .----. The boy fired | | det n | | The arrow..........................................NEXT PREVIOUS INDEX