Dependency parsing
Dependency parsing
The set of arcs, A, captures the head- dependent and grammatical function
relationships between the elements in V .
Taken together, these constraints ensure that each word has a single head, that
the dependency structure is connected, and that there is a single root node from
which one can follow a unique directed path to each of the words in the sentence
A dependency tree is then said to be projective if all the arcs that make it up are
projective.
In this example, the arc from “flight” to its modifier “was” is non-projective
since there is no path from “flight” to the intervening words “this” and
“morning”. As we can see from this diagram, projectivity (and non-projectivity)
can be detected in the way we’ve been drawing our trees.
DEPARTMENT OF INFORMATION TECHNOLOGY, SCOE,KOPARGAON
Dependency Parsing
Transition-Based Dependency Parsing:
Transition-based dependency parsing relies on a state machine which
defines the possible transitions to create the mapping from the input
sentence to the dependency tree.
The learning problem is to induce a model which can predict the next
transition in the state machine based on the transition history.
Assign the current word as the head of some previously seen word,
• Assign some previously seen word as the head of the current word,
• Postpone dealing with the current word, storing it for later processing.
LEFTARC: Assert a head-dependent relation between the word at the top of the
stack and the second word; remove the second word from the stack.
• RIGHTARC: Assert a head-dependent relation between the second word on the
stack and the word at the top; remove the top word from the stack;
• SHIFT: Remove the word from the front of the input buffer and push it onto the
stack.
. DEPARTMENT OF INFORMATION TECHNOLOGY, SCOE,KOPARGAON
Dependency Parsing
Transition-Based Dependency Parsing:
There are some preconditions for using operators.
The LEFTARC operator cannot be applied when ROOT is the second element
of the stack (since by definition the ROOT node cannot have any incoming
arcs).
And both the LEFTARC and RIGHTARC operators require two elements to be
on the stack to be applied.
“This particular set of operators implements what is known as the arc standard
approach to transition-based parsing”
DEPARTMENT OF INFORMATION TECHNOLOGY, SCOE,KOPARGAON
Dependency Parsing
Transition-Based Dependency Parsing:
We can either define a single weight matrix in the hidden layer, to operate on a
concatenation of [xw, xt, xl], or we can use three weight matrices
[W1w,W1t,W1l], one for each input type, We then apply a non-linear function
and use one more affine layer [W2] so that there are an equivalent number of
softmax probabilities to the number of possible transitions (the output
dimension).
Ultimately, the aim of the model is to predict a transition sequence from some
initial configuration “c” to a “terminal” configuration, in which the dependency
parse tree is encoded,
c = (σ, β, A).
Recall, σ is the stack,
β the buffer, and
A the set of dependency arcs for a given sentence
DEPARTMENT OF INFORMATION TECHNOLOGY, SCOE,KOPARGAON
Dependency Parsing
Neural Dependency Parsing:
Depending on the desired complexity of the model, there is flexibility in
defining the input to the neural network. The features for a given sentence S
generally include some subset of:
1. Sword: Vector representations for some of the words in S (and their
dependents) at the top of the stack σ and buffer β.
2. Stag: Part-of-Speech (POS) tags for some of the words in S. POS tags
comprise a small, discrete set: P ={NN,NNP,NNS,DT,JJ,...}
3. Slabel: The arc-labels for some of the words in S.
The arc-labels comprise a small, discrete set, describing the dependency
relation: L = {amod, tmod, nsubj, csubj, dobj, ...}
DEPARTMENT OF INFORMATION TECHNOLOGY, SCOE,KOPARGAON
Dependency Parsing
Dependency parsing for sentence structure,
The root of the tree “prefer” varies the pinnacle of the preceding sentence, as
labelled within the illustration.
As a result flight -> Denver, where flight is the pinnacle and Denver is the kid
or dependent.
This distinguishes the scenario for dependency between the two phrases, where
one serves as the pinnacle and the other as the dependent.