When relative order rewards are computed by the teacher, the correct sentence reward is indexed for each token.
when training with a relative order teacher, words only receive rewards for the sentences they belong to: where |S| is the number of sentences in the generated recipe, and 1 is an indicator variable identifying word y t belonging to sentence s j .