finished the linear-chain CRF, parameter estimation part