Skip to main content

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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

document-polluter-0.0.6.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file document-polluter-0.0.6.tar.gz.

File metadata

  • Download URL: document-polluter-0.0.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0

File hashes

Hashes for document-polluter-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1f4e17ab8cc4e6da42379f13f167db1998371469e7197097957cf0e6122bb491
MD5 d2cd3fb27758d886b8ee8ba93d48b088
BLAKE2b-256 36dcf3f172bf52c8560bb84f290426037f2ad09829ed9028e23284163d8ce4af

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.7

1 file

This release

0.0.6 This release

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page