This is the code for my headline generator and classifier that I made as part of my 2019 Monroe research project, "Countering Bias in Machine Learning Algorithms Through Natural Language Processing." It features three files:
Classifier, which contains code for the creation of a headline classifier model object that can be used in other programs. Generator, which contains code for the creation of a headline generator model object that can be used in other programs. headline-gan.py, which uses an instance of a Classifier and a Generator object to find the optimal diversity value for headline generation.