Semi-supervised Learning for Phenotyping Tasks