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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file document-polluter-0.0.2.tar.gz.
File metadata
- Download URL: document-polluter-0.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d3fbd69c7c1fe511bd0558198e577946160eadd93ba3b94f9aeb7fc64b49a4
|
|
| MD5 |
cc8811191cc60fda3072addac37b3e43
|
|
| BLAKE2b-256 |
122fce2e80334965588aac98bcb6b448e25efdbd1ffb80e3b35a4e1100577a68
|
File details
Details for the file document_polluter-0.0.2-py3.8.egg.
File metadata
- Download URL: document_polluter-0.0.2-py3.8.egg
- Upload date:
- Size: 7.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f89d576cd828b6d169951f0db936ec44b971fc0150b2f3bf1ca9743121126c16
|
|
| MD5 |
bb03a59faff1bc3b88ddabe96207e711
|
|
| BLAKE2b-256 |
4787378fb26f33348f47bada8791ffc1e1ae7c8c8ed8ec519b9e131f311f0808
|