Code for training CRF with cdec