○ Can you come up with grammatical sentences that probably have never been uttered before? (Take turns with a partner.) What does this tell you about human language?
○ Recall Strunk and White’s prohibition against using a sentence-initial however to mean “although.” Do a web search for however used at the start of the sentence. How widely used is this construction?
○ Consider the sentence Kim arrived or Dana left and everyone cheered. Write down the parenthesized forms to show the relative scope of and and or. Generate tree structures corresponding to both of these interpretations.
Tree class implements a variety of other useful methods.
Tree help documentation for more details (i.e., import the
Tree class and then type
○ In this exercise you will manually construct some parse trees.
Write code to produce two trees, one for each reading of the phrase old men and women.
Encode any of the trees presented in this chapter as a
labeled bracketing, and use
nltk.Tree() to check that it is
well-formed. Now use
draw() to display the tree.
As in (a), draw a tree for The woman saw a man last Thursday.
○ Write a recursive function to traverse a tree and return the depth of the tree, such that a tree with a single node would have depth zero. (Hint: the depth of a subtree is the maximum depth of its children, plus one.)
○ Analyze the A.A. Milne sentence about Piglet, by underlining
all of the sentences it contains then replacing these with
S (e.g., the first sentence ...