S -> NP VP NP -> NG | NG "and" NG NG -> pronoun | noun VP -> verb | verb NP | VP "and" VP Lexicon: I : pronoun. cook : noun, verb eggs : noun fish : noun, verb.Which of the following parse tree are correct:
i. S ---> NP ---> NG ---> pronoun ---> I | |-> VP ---> verb ---> cook | |-> NP ---> NG ---> noun ---> eggs | |-> "and" | |-> NG ---> noun ---> fish ii. S ---> NP ---> NG ---> pronoun ---> I | |-> VP ---> verb ---> cook | |-> NP ---> NG ---> noun ---> eggs | |-> "and" | |-> VP ---> verb ---> fish iii.S ---> NP ---> NG ---> pronoun ---> I | |-> VP ---> VP ---> verb ---> cook | | | |-> NP ---> NG ---> noun ---> eggs | |-> "and" | |-> VP ---> verb ---> fish iv. S ---> NP ---> NG ---> pronoun ---> I | |-> VP ---> verb ---> cook | |-> NP ---> NG ---> noun ---> eggs | |-> "and" | |-> VP ---> verb ---> fishA. All four.
Answer: Sentence A can be disambiguated using selectional restrictions: The object of "wore" must have the feature CLOTHES which the meaning "lawsuit" does not have. (Actually, there are other meanings of "wore" -- "She wore a smile", "The lecture wore me out" etc. but none that allows a lawsuit as object.)
Sentence B can be disambiguated using frequency in context. The word "court" establishes a context of legal affairs, in which "suit" probably means a law suit.
Morphological analysis identifies the structure of each individual word, separating it into a root word (or words) combined with prefixes, suffixes, and inflections. It is applied to each word separately. The output is a set of morphemes.
Syntactic analysis finds the grammatical structure of each individual sentence, described as a parse tree (plus transformations). The input is a single sentence, plus the output of the morphological analysis on the words of the sentence. The output is a parse tree.
Semantic analysis interprets the meaning of each individual sentence, based on the meanings of the words and the syntax of the sentence. The input is the parse tree constructed by the syntactic analysis. The output is a symbolic representation of the meaning of the sentence.
Discourse/text analysis connects the meanings of the individual sentence to get the overall meaning of the conversation/text.
A. Give an example of a sentence or pair of sentences in which selectional restrictions can be used to disambiguate potential anaphoric ambiguity. Explain the ambiguity and the selectional restriction used.
Answer: There are lots of answers. Here's one. "When I cut the steak with my knife, I found that it was undercooked" (Contrast "... its blade broke off its handle"). "Undercooked" can only modify an object with feature FOOD; hence "it" can be "steak" but not "knife".
B. Give an example of a sentence or pair of sentences in which there is a potential anaphoric ambiguity that cannot be disambiguated using selectional restrictions. Explain why not. Give a method for carrying out the disambiguation.
Answer: "Margaret invited Susan for lunch but she declined." The anaphoric ambiguity of "she" cannot be resolved by selectional restrictions, since Margaret and Susan have all the same features. Rather a rule of world knowledge asserts that if A invites B to do something, then B is likely either to accept or to decline.
Problem 10 (10 points)
In this problem and in problem 11, we consider a data set with three Boolean predictive attributes, A,B,C, and a Boolean classification, Z.
A. Suppose that your data is completely characterized by the following rules:
B. True or false: Given any consistent set of rules like those above, it is possible to construct a decision tree that executes that set of rules. By "consistent", I mean that there are no examples where two different rules give different answers.
Answer: True. At the worst, one can use the complete decision tree, where all tests on all attributes are made, and so each different instance is represented by one leaf.
Problem 11 (5 points)
Which of the following expresses the independence assumption that is used in deriving the formula for Naive Bayesian learning, for the classification problem in problem 3.
Answer: c. (b) is Bayes' Law, which is used, but is not an independence assumption. (d) and (f) are independence assumptions, but not the ones we need. (a) and (e) are junk.
Problem 12 (10 points)
Consider the following data set T. A and B are numerical attributes and Z is a Boolean classification.
A B Z 1 2 T 2 1 F 3 2 T 1 1 FA. Let P be the perceptron with weights wA = 2, wB = 1, and threshhold T=4.5. What is the value of the standard error function for this perceptron?
Answer: Perceptron P gets the first instance wrong, with an error of |(2*1)+(1*2)-4.5|=0.5 and the second instance wrong with an error of |(2*2)+(1*1)-4.5|=0.5. The total error is therefore 1.0.
B. Find a set of weights and a threshhold that categorizes all this data correctly. (Hint: Sketch a graph of the instances in the plane where the coordinates are A and B.)
Answer: wA=0, wB=1, T=1.5 will do fine.