The purpose ofĝ is to distinguish whether the target words occur or not, regardless of their frequency.
g can be interpreted as a gate function that resembles estimating the fertility in the coverage (Tu et al., 2016) and a switch probability in the copy mechanism (Gulcehre et al., 2016).