kandi background
Explore Kits

gender-bias | Reading for gender bias | Natural Language Processing library

 by   gender-bias Python Version: Current License: MIT

 by   gender-bias Python Version: Current License: MIT

Download this library from

kandi X-RAY | gender-bias Summary

gender-bias is a Python library typically used in Artificial Intelligence, Natural Language Processing applications. gender-bias has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However gender-bias has 5 bugs. You can download it from GitHub.
Reading for gender bias
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • gender-bias has a low active ecosystem.
  • It has 70 star(s) with 25 fork(s). There are 15 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 21 open issues and 11 have been closed. On average issues are closed in 139 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of gender-bias is current.
gender-bias Support
Best in #Natural Language Processing
Average in #Natural Language Processing
gender-bias Support
Best in #Natural Language Processing
Average in #Natural Language Processing

quality kandi Quality

  • gender-bias has 5 bugs (0 blocker, 0 critical, 4 major, 1 minor) and 15 code smells.
gender-bias Quality
Best in #Natural Language Processing
Average in #Natural Language Processing
gender-bias Quality
Best in #Natural Language Processing
Average in #Natural Language Processing

securitySecurity

  • gender-bias has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • gender-bias code analysis shows 0 unresolved vulnerabilities.
  • There are 2 security hotspots that need review.
gender-bias Security
Best in #Natural Language Processing
Average in #Natural Language Processing
gender-bias Security
Best in #Natural Language Processing
Average in #Natural Language Processing

license License

  • gender-bias is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
gender-bias License
Best in #Natural Language Processing
Average in #Natural Language Processing
gender-bias License
Best in #Natural Language Processing
Average in #Natural Language Processing

buildReuse

  • gender-bias releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • It has 915 lines of code, 84 functions and 23 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
gender-bias Reuse
Best in #Natural Language Processing
Average in #Natural Language Processing
gender-bias Reuse
Best in #Natural Language Processing
Average in #Natural Language Processing
Top functions reviewed by kandi - BETA

kandi has reviewed gender-bias and discovered the below as its top functions. This is intended to give you an instant insight into gender-bias implemented functionality, and help decide if they suit your requirements.

  • Generate a report for a given document
    • Add a flag
    • Set the summary
    • The list of words in the document
    • Text
    • Return a list of tuples of word indices
  • Run server
    • Runs the build
  • Check route check
    • Return a dict representation of the issue
  • Pretty print the flag
    • Pretty format text
  • Return a list of detectors
    • Return a report with personal life
      • Return a report of conditional superlatives
        • Creates a report containing the male words
          • Creates a report containing the female words in the document
            • Calculates the percentage of personal life terms
              • Returns a report containing the uncommented Words

                Get all kandi verified functions for this library.

                Get all kandi verified functions for this library.

                gender-bias Key Features

                Reading for gender bias

                Installation

                copy iconCopydownload iconDownload
                git clone https://github.com/gender-bias/gender-bias
                cd gender-bias
                pip3 install -e .
                

                Usage

                copy iconCopydownload iconDownload
                genderbias -h
                
                usage: genderbias [-h] [--file FILE] [--json] [--list-detectors]
                                  [--detectors DETECTORS]
                
                CLI for gender-bias detection
                
                optional arguments:
                  -h, --help            show this help message and exit
                  --file FILE, -f FILE  The file to check
                  --json, -j            Enable JSON output, instead of text
                  --list-detectors      List the available detectors
                  --detectors DETECTORS
                                        Use specific detectors, not all available
                

                Using the tool as a REST server

                copy iconCopydownload iconDownload
                genderbias-server
                

                How to measure using word vectors

                copy iconCopydownload iconDownload
                woman + doctor = man + doctor
                
                woman + doctor - man = doctor
                
                woman + doctor = man + doctor
                
                woman + doctor - man = doctor
                

                Jolt grouping together

                copy iconCopydownload iconDownload
                {
                  "Customers" : [ {
                    "MatchingProfile" : {
                      "DBKey" : "123",
                      "Gender" : "F",
                      "LastName" : "CHEN",
                      "Birthdate" : "1962-08-29 00:00:00.0",
                      "Contacts" : [ {
                        "ContactType" : "05",
                        "Phone_Number" : "12312312",
                        "Status" : "INSERT"
                      }, {
                        "ContactType" : "04",
                        "Phone_Number" : "78787878",
                        "Status" : "UPDATE"
                      } ]
                    }
                  }, {
                    "MatchingProfile" : {
                      "DBKey" : "456",
                      "Gender" : "M",
                      "LastName" : "DEV",
                      "Birthdate" : "1953-06-06 00:00:00.0",
                      "Contacts" : [ {
                        "ContactType" : "05",
                        "Phone_Number" : "34343434",
                        "Status" : "INSERT"
                      }, {
                        "ContactType" : "02",
                        "Phone_Number" : "56565656",
                        "Status" : "DELETE"
                      } ]
                    }
                  } ]
                }
                
                [
                  // first pivot by the value of SURNAME
                  {
                    "operation": "shift",
                    "spec": {
                      "*": { // for each item in the array
                        "SURNAME": { // match SURNAME
                          "*": { // match any value of SURNAME
                            "@2": "&[]" // copy the whole record from 2 levels up to the SURNAME as an array, so we know that in the next step it is always an array
                          }
                        }
                      }
                    }
                  },
                  {
                    "operation": "shift",
                    "spec": {
                      "*": { // match CHEN or DEV
                        "0": {
                          // only pull pk, sex, dob from the first entry of the SURNAME array so as to not duplicate output
                          "PK": "Customers[#3].MatchingProfile.DBKey",
                          "SEX": "Customers[#3].MatchingProfile.Gender",
                          "SURNAME": "Customers[#3].MatchingProfile.LastName",
                          "DATE_OF_BIRTH": "Customers[#3].MatchingProfile.Birthdate",
                
                          // this does mean that the PHONE_TYPE has to be dealt with twice
                          // once for the zeroth item, and then once again for the rest
                          "PHONE_TYPE": "Customers[#3].MatchingProfile.Contacts[0].ContactType",
                          "PHONE_NO": "Customers[#3].MatchingProfile.Contacts[0].Phone_Number",
                          "OPERATION": "Customers[#3].MatchingProfile.Contacts[0].Status"
                        },
                        "*": {
                          // handle PHONE_TYPE and friends for the other records
                          "PHONE_TYPE": "Customers[#3].MatchingProfile.Contacts[&1].ContactType",
                          "PHONE_NO": "Customers[#3].MatchingProfile.Contacts[&1].Phone_Number",
                          "OPERATION": "Customers[#3].MatchingProfile.Contacts[&1].Status"
                        }
                      }
                    }
                  }
                ]
                
                {
                  "Customers" : [ {
                    "MatchingProfile" : {
                      "DBKey" : "123",
                      "Gender" : "F",
                      "LastName" : "CHEN",
                      "Birthdate" : "1962-08-29 00:00:00.0",
                      "Contacts" : [ {
                        "ContactType" : "05",
                        "Phone_Number" : "12312312",
                        "Status" : "INSERT"
                      }, {
                        "ContactType" : "04",
                        "Phone_Number" : "78787878",
                        "Status" : "UPDATE"
                      } ]
                    }
                  }, {
                    "MatchingProfile" : {
                      "DBKey" : "456",
                      "Gender" : "M",
                      "LastName" : "DEV",
                      "Birthdate" : "1953-06-06 00:00:00.0",
                      "Contacts" : [ {
                        "ContactType" : "05",
                        "Phone_Number" : "34343434",
                        "Status" : "INSERT"
                      }, {
                        "ContactType" : "02",
                        "Phone_Number" : "56565656",
                        "Status" : "DELETE"
                      } ]
                    }
                  } ]
                }
                
                [
                  // first pivot by the value of SURNAME
                  {
                    "operation": "shift",
                    "spec": {
                      "*": { // for each item in the array
                        "SURNAME": { // match SURNAME
                          "*": { // match any value of SURNAME
                            "@2": "&[]" // copy the whole record from 2 levels up to the SURNAME as an array, so we know that in the next step it is always an array
                          }
                        }
                      }
                    }
                  },
                  {
                    "operation": "shift",
                    "spec": {
                      "*": { // match CHEN or DEV
                        "0": {
                          // only pull pk, sex, dob from the first entry of the SURNAME array so as to not duplicate output
                          "PK": "Customers[#3].MatchingProfile.DBKey",
                          "SEX": "Customers[#3].MatchingProfile.Gender",
                          "SURNAME": "Customers[#3].MatchingProfile.LastName",
                          "DATE_OF_BIRTH": "Customers[#3].MatchingProfile.Birthdate",
                
                          // this does mean that the PHONE_TYPE has to be dealt with twice
                          // once for the zeroth item, and then once again for the rest
                          "PHONE_TYPE": "Customers[#3].MatchingProfile.Contacts[0].ContactType",
                          "PHONE_NO": "Customers[#3].MatchingProfile.Contacts[0].Phone_Number",
                          "OPERATION": "Customers[#3].MatchingProfile.Contacts[0].Status"
                        },
                        "*": {
                          // handle PHONE_TYPE and friends for the other records
                          "PHONE_TYPE": "Customers[#3].MatchingProfile.Contacts[&1].ContactType",
                          "PHONE_NO": "Customers[#3].MatchingProfile.Contacts[&1].Phone_Number",
                          "OPERATION": "Customers[#3].MatchingProfile.Contacts[&1].Status"
                        }
                      }
                    }
                  }
                ]
                

                Community Discussions

                Trending Discussions on gender-bias
                • How to measure using word vectors
                • Jolt grouping together
                Trending Discussions on gender-bias

                QUESTION

                How to measure using word vectors

                Asked 2019-Jun-15 at 16:08

                I'm attempting to understand how bias can be measured using word embeddings. Reading the article https://towardsdatascience.com/gender-bias-word-embeddings-76d9806a0e17

                enter image description here

                What is the bias being identified in the above statement ? Is the bias here that a woman cannot be seen as a doctor when a man is involved ?

                Is a neutral bias for a either a man or woman being identified is where there is a small difference between woman,doctor man,doctor , represented a vector : $woman + doctor \approx man + doctor$ ?

                ANSWER

                Answered 2019-Jun-15 at 16:08

                You would expect that

                woman + doctor = man + doctor
                

                Or rewritten:

                woman + doctor - man = doctor
                

                But since it is 'nurse' in that word embedding space, that is an indicator for bias towards women in healthcare to be percieved as nurses. Doctors are associated more with men in the corpus from which the embeddings were trained, so it can be concluded that the corpus (and the learned word embedding) has a gender bias.

                Source https://stackoverflow.com/questions/56611841

                Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                Vulnerabilities

                No vulnerabilities reported

                Install gender-bias

                Currently, the most reliable way to download and start using this code is to clone it from this repository and install it using pip:. NOTE: The last line in the above snippet installs this library in "editable" mode, which is probably fine while the library is in a state of flux. This installation process will add a new command-line tool to your PATH, called genderbias. To install the dependencies, run: pip3 install -r requirements.txt.

                Support

                If you want to report a problem or suggest an improvement, please open an issue at this github repository. You can also reach Mollie by email (mollie@biascorrect.com) or on twitter.

                DOWNLOAD this Library from

                Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                over 430 million Knowledge Items
                Find more libraries
                Reuse Solution Kits and Libraries Curated by Popular Use Cases
                Explore Kits

                Save this library and start creating your kit

                Share this Page

                share link
                Reuse Pre-built Kits with gender-bias
                Consider Popular Natural Language Processing Libraries
                Compare Natural Language Processing Libraries with Highest Support
                Compare Natural Language Processing Libraries with Highest Quality
                Compare Natural Language Processing Libraries with Highest Security
                Compare Natural Language Processing Libraries with Permissive License
                Compare Natural Language Processing Libraries with Highest Reuse
                Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                over 430 million Knowledge Items
                Find more libraries
                Reuse Solution Kits and Libraries Curated by Popular Use Cases
                Explore Kits

                Save this library and start creating your kit

                • © 2022 Open Weaver Inc.