jurafsky&martin_3rdEd_17 (1).pdf

We retrieve the best possible state on the agenda the

Info icon This preview shows pages 260–263. Sign up to view the full content.

we retrieve the best possible state on the agenda, the while loop continues as long as there are non-final states on the agenda. The beam search approach requires a more elaborate notion of scoring than we used with the greedy algorithm. There, we assumed that a classifier trained using supervised machine learning would serve as an oracle, selecting the best transition operator based on features extracted from the current configuration. Regardless of the specific learning approach, this choice can be viewed as assigning a score to all
Image of page 260

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

14.5 G RAPH -B ASED D EPENDENCY P ARSING 261 the possible transitions and picking the best one. ˆ T ( c ) = argmaxScore ( t , c ) With a beam search we are now searching through the space of decision se- quences, so it makes sense to base the score for a configuration on its entire history. More specifically, we can define the score for a new configuration as the score of its predecessor plus the score of the operator used to produce it. ConfigScore ( c 0 ) = 0 . 0 ConfigScore ( c i ) = ConfigScore ( c i - 1 )+ Score ( t i , c i - 1 ) This score is used both in filtering the agenda and in selecting the final answer. The new beam search version of transition-based parsing is given in Fig. 14.11 . function D EPENDENCY B EAM P ARSE ( words , width ) returns dependency tree state { [root], [ words ], [], 0.0 } ;initial configuration agenda h state i ; initial agenda while agenda contains non-final states newagenda hi for each state 2 agenda do for all { t | t 2 V ALID O PERATORS ( state ) } do child A PPLY ( t , state ) newagenda A DD T O B EAM ( child , newagenda , width ) agenda newagenda return B EST O F ( agenda ) function A DD T O B EAM ( state , agenda , width ) returns updated agenda if L ENGTH ( agenda ) < width then agenda I NSERT ( state , agenda ) else if S CORE ( state ) > S CORE (W ORST O F ( agenda )) agenda R EMOVE (W ORST O F ( agenda )) agenda I NSERT ( state , agenda ) return agenda Figure 14.11 Beam search applied to transition-based dependency parsing. 14.5 Graph-Based Dependency Parsing Graph-based approaches to dependency parsing search through the space of possible trees for a given sentence for a tree (or trees) that maximize some score. These methods encode the search space as directed graphs and employ methods drawn from graph theory to search the space for optimal solutions. More formally, given a sentence S we’re looking for the best dependency tree in G s , the space of all possible trees for that sentence, that maximizes some score. ˆ T ( S ) = argmax t 2 G S score ( t , S )
Image of page 261
262 C HAPTER 14 D EPENDENCY P ARSING As with the probabilistic approaches to context-free parsing discussed in Chap- ter 13, the overall score for a tree can be viewed as a function of the scores of the parts of the tree. The focus of this section is on edge-factored approaches where the edge-factored score for a tree is based on the scores of the edges that comprise the tree.
Image of page 262

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

Image of page 263
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