Softmax-Margin CRFs: Training Log-Linear Models with Cost Functions
discriminative training methods for hidden markov models : theory and experiments with perceptron algorithms .