jurafsky&martin_3rdEd_17 (1).pdf

Or postpone doing anything with the current word

Info icon This preview shows pages 252–254. Sign up to view the full content.

Or postpone doing anything with the current word, adding it to a store for later processing. To make these actions more precise, we’ll create three transition operators that will operate on the top two elements of the stack: LEFT A RC : Assert a head-dependent relation between the word at the top of stack and the word directly beneath it; remove the lower word from the stack. RIGHT A RC : Assert a head-dependent relation between the second word on the stack and the word at the top; remove the word at the top of the stack; SHIFT : Remove the word from the front of the input buffer and push it onto the stack. This particular set of operators implements the what is known as the arc stan- dard approach to transition-based parsing ( Covington 2001 , Nivre 2003 ). There are arc standard two notable characteristics to this approach: the transition operators only assert re- lations between elements at the top of the stack, and once an element has been assigned its head it is removed from the stack and is not available for further pro- cessing. As we’ll see, there are alternative transition systems which demonstrate different parsing behaviors, but the arc standard approach is quite effective and is simple to implement.
Image of page 252

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

14.4 T RANSITION -B ASED D EPENDENCY P ARSING 253 To assure that these operators are used properly we’ll need to add some pre- conditions to their use. First, since, by definition, the ROOT node cannot have any incoming arcs, we’ll add the restriction that the LEFT A RC operator cannot be ap- plied when ROOT is the second element of the stack. Second, both reduce operators require two elements to be on the stack to be applied. Given these transition opera- tors and preconditions, the specification of a transition-based parser is quite simple. Fig. 14.6 gives the basic algorithm. function DEPENDENCY P ARSE ( words ) returns dependency tree state { [root], [ words ], [] } ; initial configuration while state not final t O RACLE ( state ) ; choose a transition operator to apply state A PPLY ( t , state ) ; apply it, creating a new state return state Figure 14.6 A generic transition-based dependency parser At each step, the parser consults an oracle (we’ll come back to this shortly) that provides the correct transition operator to use given the current configuration. It then applies that operator to the current configuration, producing a new configuration. The process ends when all the words in the sentence have been consumed and the ROOT node is the only element remaining on the stack. The efficiency of transition-based parsers should be apparent from the algorithm. The complexity is linear in the length of the sentence since it is based on a single left to right pass through the words in the sentence. More specifically, each word must first be shifted onto the stack and then later reduced.
Image of page 253
Image of page 254
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