The pointer-generator model allows either generating words from a vocabulary or copying words from the input sequence.
the probability of generating the next word is given by a mixture model: where q(s t , c t , y t−1 ) is a binary neural classifier deciding the probability of switching between the generation mode and the copying mode.