code for entailment evaluation