This is done using a coverage vector, v S i for each training instance that keeps track of the production rules triggered by x i , and gets updated whenever one of those desired productions is produced by the decoder.
v S i is a vector of 1s and 0s, with 1s indicating the triggered productions that are yet to be produced by the decoder.