First-order, linear-chain conditional random fields with position-wise constraints over label values