Harnessing Deep Neural Networks with Logic Rules