Syntax Tree & Generative Grammer

SNPDETTheNOUNmanRCRPRONwhomSNPDETtheNOUNdogVPVERBbitesNPNOUNGAP

1. Tree

#----------------------------------#
# Default Generative Grammar Rules #
#----------------------------------#

S -> NP VP
S -> NP RC
S -> 'If' S 'then' S

VP -> VERB
VP -> VERB NP
VP -> VERB ADJ
VP -> VP PP
VP -> AUX VP
VP -> AUX 'not' VP
VP -> VP CCONJ VP

NP -> NOUN
NP -> DET NOUN
NP -> DET PROPN
NP -> PROPN
NP -> PRON
NP -> NP PP
NP -> NP RC
NP -> NP CCONJ NP

PP -> P NP

RC -> RPRON S


#-------------------------------------#
# Additional Generative Grammar Rules #
#-------------------------------------#

NOUN -> 'GAP'

#---------------------------------#
# POS of sentence tagged by spaCy #
#---------------------------------#

DET -> 'The'
NOUN -> 'man'
RPRON -> 'whom'
DET -> 'the'
NOUN -> 'dog'
VERB -> 'bites'
VERB -> 'bites'

Syntax Tree Bracket Notation

(S
  (NP (DET The) (NOUN man))
  (RC
    (RPRON whom)
    (S (NP (DET the) (NOUN dog)) (VP (VERB bites) (NP (NOUN GAP))))))

1. Tree