Given these examples, it is straightforward to construct a reward function that connects policy gradient to maximum likelihood.
define a reward function r(h) that returns one when h matches the annotation for the document being analyzed, and zero otherwise.