The matching score S a,b is calculated on the generalized sentences s k of s k and s j of s j as follows: where ω k a and ω j b are the a-th and b-th word classes of s k and s j , respectively.
the matching score equals 1 if the a-th and the b-th tokens of the two original sentences have the same word class.