Skip to main content

Flips the gender in a text snippet or epub

Project description

Gender Bender

This library allows you to flip the gender of a string or eBook (only works with the epub format). The motivation was to be able to examine gender norms in a fun way.

To use the epub format, I recommend the Calibre reader or the Kobo.

Installation

Python 3 only

With pip:

pip install gender-bender 

or with poetry:

poetry add gender-bender

Note: on first usage, it will install an English model for the Spacy dependency. This is unable to be installed from PyPI due to this issue.

Usage

Or from python:

from gender_bender import gender_bend_epub
gender_bend_epub('./Mythical_Man_Month.epub')

You can also gender-bend a string:

from gender_bender import gender_bend
x = gender_bend("If Ivanka weren't my daughter, perhaps I'd be dating her.")

assert x == "If Ivan weren't my son, perhaps I'd be dating him."

Installing from source

Get the repo:

git clone https://github.com/Garrett-R/gender_bender.git
cd gender_bender
pip install -r requirements.txt

It can be run as a script:

./main.py --input Lord_of_the_Flies.epub  --output Lady_of_the_Flies.epub

If you'd like to choose the names yourself (recommended for translating a whole ebook), you can do:

./main.py --input The_Little_Mermaid.epub --interactive-naming

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

gender-bender-0.1.3.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

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

gender_bender-0.1.3-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file gender-bender-0.1.3.tar.gz.

File metadata

  • Download URL: gender-bender-0.1.3.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.5 Linux/4.15.0-112-generic

File hashes

Hashes for gender-bender-0.1.3.tar.gz
Algorithm Hash digest
SHA256 92e4a2de5d3582556e876f224e86e03530b3bfc71bdf21a84944d842345bce47
MD5 bc7cc779fcc000a6d100ec1e5b1983b4
BLAKE2b-256 70eee2a3998939dbef5cfb57e11360f8aaa41cca8030d62aa91fea049bc4c26e

See more details on using hashes here.

File details

Details for the file gender_bender-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gender_bender-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.5 Linux/4.15.0-112-generic

File hashes

Hashes for gender_bender-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc733540a0b9f28c85f8a23830736bb02e55708c52977e9d5281d04007159f5b
MD5 d04478e6ccaea6431a577f8ba8b3454c
BLAKE2b-256 82e576b1adcdb57fa750117fa690b5eadda215dc04f82856b7b6771d943f09e2

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