Textual inference for eligibility criteria resolution in clinical trials