Ling 483/783
Ambiguity Exercises
Due: Nov. 10th
1. I wrote the following program to analyze the output of the x operator (p. 50). Change the multiplication statement by removing the parentheses. Explain the change that you produce in this manner.
@list = ("I",
"see",
"you");
print "@list \n";
@list = (@list) x 2;
print "@list \n";
2. In my description of our desired parser, I mentioned that it should determine which is the best potential parse for the input sentence. The final parser that we constructed in this chapter omits this step. Add a subroutine to the parser that selects the best parse(s), i.e., the parse(s) that covers the greatest number of terminal elements in the sentence.