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.

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.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

document_polluter-0.0.1-py3.8.egg (7.3 kB view details)

Uploaded Egg

File details

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

File metadata

  • Download URL: document-polluter-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 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.1.tar.gz
Algorithm Hash digest
SHA256 e3acdeab0b56a9a2788f541da799ada240308c54dbe469110fab7d21a4e4804d
MD5 ed798aba258de4d3438250c07a106780
BLAKE2b-256 27eb8038279aab1418363b31d56c58b557ee95ea1f3f72176544806c046baee8

See more details on using hashes here.

File details

Details for the file document_polluter-0.0.1-py3.8.egg.

File metadata

  • Download URL: document_polluter-0.0.1-py3.8.egg
  • Upload date:
  • Size: 7.3 kB
  • Tags: Egg
  • 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.1-py3.8.egg
Algorithm Hash digest
SHA256 041abd4e2ea19f4126a33442803a51dfb2552b0d9da73d66492d6e7b04d5dff7
MD5 6cd57521ce37375fd107d6a52a7ed381
BLAKE2b-256 8dbc705b0b316d9f95b738ab09fa039f4b89e6432cee4a922614211b488a89b9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

2 files

This release

0.0.1 This release

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