Tree Diagrams and Syntax (Ambiguity Analysis)
We have rules for how we interpret sentences. Sometimes, though, we do not know which rules to use for a given sentence. This introduces ambiguity in the interpretation of some sentences. To illustrate this, we will use the following sentence:
“I shot an elephant in my pajamas.”
Interpretation 1

The most common interpretation of the sentence is that I, while wearing my pajamas, shot an elephant. the tree structure for this interpretation would look something like this:
Interpretation 2

Another, more humorous interpretation, is I shot an elephant who was somehow wearing my pajamas. Elephants seldom wear pajamas, so this is unlikely to be the first interpretation that comes to mind.
Additionally, we can change the interpretation further by using the definition of “shoot” as “to take a picture of” rather than “to fire a gun at.” This is a different kind of ambiguity called lexical ambiguity.