The model is run using the AWD LSTM language model
To run the model with main.py with bias regularization -
- Set the value of the the booleans
--bias_reg_encoderand--bias_reg_decoderas True - Set the value of
--bias_reg_en_factorand--bias_reg_de_factor - Input the
--gender_pair_filefrom the repo if you are using PTB, wikitext-2 or CNN/Dailymail. If you are using a different corpus, you will need to create your own based on the corpus.
To run the bias scores on a text corpus -
- `python fixed_context_bias_score.py filepath dm -w 100 -n 1
- `python infinite_context_bias_score.py filepath dm -w 100 -n 1