{'fraction_non_alphanumeric': 0.016666666666666666, 'fraction_numerical': 0.0029411764705882353, 'mean_word_length': 5.673202614379085, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Masked Hard Coverage Mechanism on Pointer-generator Network for Natural Language Generation

Natural Language Generation (NLG) task is to generate natural language utterances from structured data. Seq2seq-based systems show great potentiality and have been widely explored for NLG. While they achieve good generation performance, over-generation and under-generation issues still arise in the generated results. We propose maintaining a masked hard coverage mechanism in the pointer-generator network, a seq2seqbased architecture that trains a switch policy to produce output sequences by partially copying from input structured data. The proposed mechanism can be regarded as the inner controlling module to keep track of the copying history and force the network to generate sentences accurately covering all information provided in structured data. Experimental results show that our coverage mechanism alleviates the over-generation and under-generation issues and achieves decent performance on the E2E NLG dataset.