Furthermore, it is unreasonable to implement the exact computation for each constraint.
we implemented a generic approximation for the hamming distance assuming only that we are given a boolean function φ C (y N ) that returns whether labeling the token x N with state y N violates constraint with respect to an already labeled sequence (x 1 , .