12.07.2015 Views

The dissertation of Andreas Stolcke is approved: University of ...

The dissertation of Andreas Stolcke is approved: University of ...

The dissertation of Andreas Stolcke is approved: University of ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

= ¸Let t,t) ¸ .V=i£,t,t,6666yyyy¸ Æ—@_,6)1yt,“ ·“ ·Õ· “Æ—@ è ,>è1tÖ0 Ȩ½£=ï1CHAPTER 6. EFFICIENT PARSING WITH STOCHASTIC CONTEXT-FREE GRAMMARS 166to show that (6.5)) ¸@B0 be the probability for LR item ) ¸@(with a dot somewhere in the RHS). We want.—£ ˜M0) ¸position <strong>of</strong> the last input symbol processed; a reduce action <strong>of</strong> the parser effectively resets H to the beginning<strong>of</strong> the reduced nonterminal.<strong>The</strong> computation <strong>of</strong> LR item sets begins with the initial item £j9, whichthereby agreeing with (6.5).¸<strong>The</strong> first operation for constructing item sets <strong>is</strong> closure, whereby for each item ) ¸has t 6 1 by definition,.—£=¤˜ , all items.—£ ˜M0%6@A?for any item ) ¸ 0å…å…å 10.—£ ˜ , regardless <strong>of</strong> position H and start index". Note that H <strong>is</strong> not always equal to theC+-,9£j@corresponding to the available productions=¸@are added to the set. Th<strong>is</strong> operation <strong>is</strong> recursiveand corresponds obviously to Earley’s prediction step. Also, the way in whicht values are propagated followsexactly the way forward probabilities are handled during prediction. (<strong>The</strong> left-corner relation ©ë could beused to compute closure probabilities exactly, but Wright suggests using a truncated recursion instead.) Sinceclosure and prediction are thus <strong>is</strong>omorphic, and since the prefix relative to the items does not change, (6.5)also remains valid during th<strong>is</strong> step.Finally, a successor set ² Ù <strong>of</strong> kernel items <strong>is</strong> constructed from an ex<strong>is</strong>ting closed set ² in whatcorresponds to Earley’s scanning or completion. Specifically, ) ¸forI ²each current item , an item<strong>is</strong> placed in , reachable by scanning a or reducing (completing) a nonterminal=..—£=§˜terminal= ² Ù¸ .V=i£ )let= (We stand for either terminal or nonterminal to treat both cases jointly.) <strong>The</strong> new item probability <strong>is</strong>computed as) ¸ .V=i£) ¸(6.6)˜.—£=ë˜M0˜M0&6,> Ȩ½£=ï 0Th<strong>is</strong> can be understood as scaling the total probability <strong>of</strong> items matching= to unity.By substituting (6.5) into (6.6) we get“ ·ž'¼å‘îÇ ^ Õ ”'/å‘KÖ0¿j¿j¿^ˆ‡1 H¾zØM0c6Æ @ ,>“ · C+-,90å…å…å@A?10Æ @ ,) ¸.M£=§˜M0ž'¼å‘î0ž'¼å‘îÆ—@;,> ¸~½£=ïÆ @ ,) ¸.M£=§˜M0Š@ è ,=ë00Š@ èè ,) ¸ .V=i£Æ—@˜M0(6.7)ž'¼å‘î,=ë0Æ—@;,> ¸~½£=ï0Ȩ½=Œ£ ïî@ è ,) ¸ .V=i£Æ˜M0(6.8)@ è ?ž'¼ ‘å+-,9 10C 0å…å…å

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!