jurafsky&martin_3rdEd_17 (1).pdf

The nonsensical parse on the right however would have

Info icon This preview shows pages 214–217. Sign up to view the full content.

View Full Document Right Arrow Icon
parse on the left means “Book a flight that serves dinner”. The nonsensical parse on the right, however, would have to mean something like “Book a flight on behalf of ‘the dinner”’ just as a structurally similar sentence like “Can you book John a flight?” means something like “Can you book a flight on behalf of John?” The probability of a particular parse T is defined as the product of the probabil- ities of all the n rules used to expand each of the n non-terminal nodes in the parse tree T , where each rule i can be expressed as LHS i ! RHS i : P ( T , S ) = n Y i = 1 P ( RHS i | LHS i ) (13.2) The resulting probability P ( T , S ) is both the joint probability of the parse and the sentence and also the probability of the parse P ( T ) . How can this be true? First, by the definition of joint probability: P ( T , S ) = P ( T ) P ( S | T ) (13.3)
Image of page 214

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
13.1 P ROBABILISTIC C ONTEXT -F REE G RAMMARS 215 But since a parse tree includes all the words of the sentence, P ( S | T ) is 1. Thus, P ( T , S ) = P ( T ) P ( S | T ) = P ( T ) (13.4) S VP NP Nominal Noun flight Nominal Noun dinner Det the Verb Book S VP NP Nominal Noun flight NP Nominal Noun dinner Det the Verb Book Rules P Rules P S ! VP .05 S ! VP .05 VP ! Verb NP .20 VP ! Verb NP NP .10 NP ! Det Nominal .20 NP ! Det Nominal .20 Nominal ! Nominal Noun .20 NP ! Nominal .15 Nominal ! Noun .75 Nominal ! Noun .75 Nominal ! Noun .75 Verb ! book .30 Verb ! book .30 Det ! the .60 Det ! the .60 Noun ! dinner .10 Noun ! dinner .10 Noun ! flight .40 Noun ! flight .40 Figure 13.2 Two parse trees for an ambiguous sentence. The transitive parse on the left corresponds to the sensible meaning “Book a flight that serves dinner”, while the ditransitive parse on the right corresponds to the nonsensical meaning “Book a flight on behalf of ‘the dinner’ ”. We can compute the probability of each of the trees in Fig. 13.2 by multiplying the probabilities of each of the rules used in the derivation. For example, the proba- bility of the left tree in Fig. 13.2 a (call it T le ft ) and the right tree (Fig. 13.2 b or T right ) can be computed as follows: P ( T le ft ) = . 05 . 20 . 20 . 20 . 75 . 30 . 60 . 10 . 40 = 2 . 2 10 - 6 P ( T right ) = . 05 . 10 . 20 . 15 . 75 . 75 . 30 . 60 . 10 . 40 = 6 . 1 10 - 7 We can see that the left (transitive) tree in Fig. 13.2 has a much higher probability than the ditransitive tree on the right. Thus, this parse would correctly be chosen by a disambiguation algorithm that selects the parse with the highest PCFG probability. Let’s formalize this intuition that picking the parse with the highest probability is the correct way to do disambiguation. Consider all the possible parse trees for a given sentence S . The string of words S is called the yield of any parse tree over S . Yield
Image of page 215
216 C HAPTER 13 S TATISTICAL P ARSING Thus, out of all parse trees with a yield of S , the disambiguation algorithm picks the parse tree that is most probable given S : ˆ T ( S ) = argmax Ts . t . S = yield ( T ) P ( T | S ) (13.5) By definition, the probability P ( T | S ) can be rewritten as P ( T , S ) / P ( S ) , thus lead- ing to ˆ T ( S ) = argmax Ts . t . S = yield ( T ) P ( T , S ) P ( S ) (13.6) Since we are maximizing over all parse trees for the same sentence, P ( S ) will be a constant for each tree, so we can eliminate it: ˆ T ( S ) = argmax Ts .
Image of page 216

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 217
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern