Skip to main content

Generates biased stop word lists for various genres

Project description

https://badge.fury.io/py/biased-stop-words.svg http://img.shields.io/badge/license-MIT-yellow.svg?style=flat https://img.shields.io/badge/contact-Gregology-blue.svg?style=flat

Overview

Bias are bugs

Stop words are words which are filtered out before processing of natural language data. Often in text analysis there are non-casual correlations, consider the following documents:

  • He is an astronaut, he is on Venus

  • He is an accountant, he is on Earth

  • She is an astronaut, she is on Mars

Processing these documents into two topics will result in gendered clustering. If we remove the gendered terms:

  • is an astronaut, is on Venus

  • is an accountant, is on Earth

  • is an astronaut, is on Mars

Processing will result in job clustering. Both clusterings are valid, however if you are interested in employing an astronaut, you don’t want male accountants showing up. There are many other examples of non casual relationships occurring in natural language; religion, ethnicity, and age to name a few.

Available genres

  • English Gendered Terms

  • US names

  • Religion (Partial)

More will be available soon. Contribute at https://github.com/gregology/biased-stop-words

Installation

biased-stop-words is available on PyPI

http://pypi.python.org/pypi/biased-stop-words

Install via pip

$ pip install biased-stop-words

Or via easy_install

$ easy_install biased-stop-words

Or directly from biased-stop-words’s git repo <https://github.com/gregology/biased-stop-words>

$ git clone --recursive git://github.com/gregology/biased-stop-words.git
$ cd biased-stop-words
$ python setup.py install

Basic usage

>>> from biased_stop_words import genres, get_stop_words
>>> genres()
'religions, gendered, us-common-names, us-names, us-male-names, us-female-names, gendered-nouns'
>>> get_stop_words('gendered', 'us-common-names')
[u'trenton', u'augustine', u'khalil', u'aiden', u'elisabeth', u'andre', u'khanum', u'elva', u'fran...

Running Test

$ python biased_stop_words/tests.py

Python compatibility

Developed for Python 2 & 3.

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

biased-stop-words-2017.5.13.3.tar.gz (39.7 kB view details)

Uploaded Source

File details

Details for the file biased-stop-words-2017.5.13.3.tar.gz.

File metadata

File hashes

Hashes for biased-stop-words-2017.5.13.3.tar.gz
Algorithm Hash digest
SHA256 1e6d055c1980ed553d775ab43ea18ea7b6d20a86870efb0d54bc033ef82589ac
MD5 ded915efc9e822b639c81ad6235c54cf
BLAKE2b-256 dd053e0fff71e44f9b66a9aae8f8294855ac275a514f9eb4e45f745f6ec2c980

See more details on using hashes here.

Supported by

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