3. The computer-implemented method of claim 2 , wherein optimizing the objective function further comprises calculating partial derivatives with respect to both θ and λ.
4. The computer-implemented method of claim 3 , wherein calculating the partial derivative with respect to θ includes: determining expectations of the model features f given the current distribution p θ and the constraint distribution q; and performing tractable inference by assuming that a function ƒ(x,y) of the model features f factorizes according to smaller parts as follows: f ⁡ ( x , y ) = ∑ i ⁢ f ⁡ ( x , y i , y i - 1 ) , where i represents an index ranging over all tokens in a particular sentence x and labels y.