Semi-supervised learning for structured output prediction