The second term in the gradient-the expected feature vector-can be computed efficiently because the feature vector φ(t ) decomposes over the spans of t .
the inside-outside algorithm provides the quantities needed to compute the posterior probability of each terminal span [k, ) and each split non-terminal (k, m, ).