/neutralizing-bias

Code and data for the paper, "Automatically Neutralizing Subjective Bias in Text"

Primary LanguagePython

Neutralizing Biased Text

This repo contains code for the paper, "Automatically Neutralizing Subjective Bias in Text".

Concretely this means algorithms for

  • Identifying biased words in sentences.
  • Neutralizing bias in sentences.

firstpage

Installation

$ pip install -r requirements.txt
$ python
>> import nltk; nltk.download("punkt")

Data

Click this link to download (100MB, expands to 500MB).

Overview

harvest/: Code for making the dataset. It works by crawling and filtering Wikipedia for bias-driven edits.

src/: Code for training models and using trained models to run inference. The models implemented here are referred to as MODULAR and CONCURRENT in the paper.

Usage

Please see src/README.md for bias neutralization directions.

See harvest/README.md for making a new dataset (as opposed to downloading the one available above).