semvec/pypi-packages huggingface dataset:
document-polluter 0.0.7
Pollutes documents with terms biased on specific geners
License: MIT
Keywords: stop words machine learning ml bias biased natural language processing nlp

# Document Polluter

## Overview

Document Polluter replaces gendered words in documents to create test data for machine learning models in order to identify bias.

Checkout the examples in the [interactive notebook](https://mybinder.org/v2/gh/gregology/document-polluter/notebook).

## Installation

`document-polluter` is available on PyPI

http://pypi.python.org/pypi/document-polluter

### Install via pip

`$ pip install document-polluter`

### Install via easy_install

`$ easy_install document-polluter`

### Install from repo

`git repo <https://github.com/gregology/document-polluter>`

```
$ git clone --recursive git://github.com/gregology/document-polluter.git
$ cd document-polluter
$ python setup.py install
```

## Basic usage

```
>>> from document_polluter import DocumentPolluter
>>> documents = ['she shouted', 'my son', 'the parent']
>>> dp = DocumentPolluter(documents=documents, genre='gender')
>>> print(dp.polluted_documents['female'])
['she shouted', 'my daughter', 'the mother']
```

## Running Test

`$ python document_polluter/tests.py `
mse-antede-fs2020-utilities 0.3
Utilities for AnTeDe course.
License: MIT

This library provides some basic utilities for the AnTeDe class of the MSE.

# Install 

This package builds on Python 3.

```bash
sudo pip3 install mse_antede_fs2020_utilities
```

# Build

Increase the version number in [setup.py](setup.py).


In order to extract the python script and upload it to pypi run

```bash
docker run -e TZ=Europe/Zurich --name datascience-notebook --net=host -p 8888:8888 -v "$(pwd)":/home/jovyan/work -it --rm i4ds/datascience-notebook start-notebook.sh --NotebookApp.token=''
docker exec -it datascience-notebook /bin/bash
cd work
rm -rf dist/*
python3 setup.py bdist_wheel
python3 -m twine upload dist/*
```

Upload everything to the git repository.