# 13.6.3 Building Structures for Non-terminals

You can add an extra argument to the predicates to represent a parse tree, forming a rule such as

 $\displaystyle{sentence(L_{0},L_{2},s(NP,VP))\leftarrow\mbox{}}$ $\displaystyle\ \ \ \ {noun\_phrase(L_{0},L_{1},NP)\wedge\mbox{}}$ $\displaystyle\ \ \ \ {verb\_phrase(L_{1},L_{2},VP).}$

which means that the parse tree for a sentence is of the form $s(NP,VP)$, where $NP$ is the parse tree for the noun phrase and $VP$ is the parse tree for the verb phrase.

This is important if you want some result from the syntactic analysis, not just to know whether the sentence is syntactically valid. The notion of a parse tree is a simplistic form of what is required because it does not adequately represent the meaning or the deep structure of a sentence. For example, you would really like to recognize that “Sam taught the AI course” and “the AI course was taught by Sam” have the same meaning, only differing in the active or passive voice.