Online Max-Margin Weight Learning for Markov Logic Networks