Skip to main content

Pollutes documents with terms biased on specific geners

Project description

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

Project details


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

Uploaded Source

File details

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

File metadata

  • Download URL: document-polluter-0.0.3.tar.gz
  • Upload date:
  • Size: 3.8 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.3.tar.gz
Algorithm Hash digest
SHA256 5dd41d09fcd6ec45dda2b209cd7f510bab661cbe8f0d0604c194f6b86da5642a
MD5 21781c51db07c49e8f69994703284c0c
BLAKE2b-256 6ae1d65f46f18e87b1539c749cc7f2150578dbedace7b0d50ae7fd4eaf0d8995

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page