Disinformation: Starter Kit - Bias

share link

by kandikits dot icon Updated: Aug 21, 2023

technology logo
technology logo

1-Click Kit 1-Click Kit ย 


Bias is prevalent in every aspect of our lives. Our brains are hardwired to categorize things we encounter in order to make sense of the complicated world around us. However, biases can cause us to form prejudices against others, which allows for egregious inequalities to form between different demographics.


While bias comes in many forms, bias words in writing is one form. Implicit bias in letter writing or evaluations negatively affects individuals at every stage of their career.


In this challenge, we are inviting to build a solution for detecting bias in writings such as letter of recommendations, Job Descriptions etc with respect to gender and race for promoting equity. You can choose any topic of your choice. The sample solution kit helps to detect gender bias.

Deployment Information

The entire solution is available as a package to download from the source code repository. Please add your kit solution or prototype source repository in this section.


For Windows OS,

  1. Download, extract and double-click the kit installer file to install the kit. Do ensure to extract the zip file before running it.
  2. The installation may take from 2 to 10 minutes based on bandwidth.
  3. When you're prompted during the installation of the kit, press Y to launch the app automatically and run the notebook cell by cell, by clicking on a cell and clicking the Run button below the Menu bar.
  4. To run the app manually, press N when you're prompted and locate the zip file Bias_Detector.zip
  5. Extract the zip file and navigate to the directory gender-bias-master
  6. Open a command prompt in the extracted directory gender-bias-master and run the command jupyter notebook.


For other Operating System,

  1. Install python
  2. Click here to download the repository
  3. Extract the zip file and navigate to the directory gender-bias-master
  4. Open the terminal in the extracted directory gender-bias-master
  5. Install dependencies by executing the command pip install -r requirements.txt
  6. Run the command jupyter notebook.


Click on the button below to download the solution and follow the deployment instructions to begin set-up. This 1-click kit has all the required dependencies and resources you may need to build your Bias Detector App.

Instruction to Run

Follow below instructions to run the solution.

  1. Locate and open the gender-bias.ipynb notebook from the Jupyter Notebook browser window.
  2. Execute cells in the notebook by selecting Cell --> Run All from Menu bar


For running it with your text,

  1. Open letterofRecW file from the location data/input from gender-bias.ipynb location.
  2. Update text in the letterofRecW file.
  3. Execute cells in the notebook by selecting Cell --> Run All from Menu bar.
  4. Output will be stored in a file gender-biased-words.txt in the location data/output. Output text is in json format. Output data format is: name - detector name. e.g. "Terms biased towards women" summary - summary of the detected bias flags - flag the detected bias words. e.g. "leader" You can additionally create your own detectors for race and dictionary dataset as well as other enhancements for additional score.

Troubleshooting

  1. While running batch file, if you encounter Windows protection alert, select More info --> Run anyway
  2. During kit installer, if you encounter Windows security alert, click Allow

For a detailed tutorial on installing & executing the solution as well as learning resources including training & certification opportunities, please visit the OpenWeaver Community

Development Environment

VSCode and Jupyter Notebook are used for development and debugging. Jupyter Notebook is a web based interactive environment often used for experiments, whereas VSCode is used to get a typical experience of IDE for developers. Jupyter Notebook is used for our development.

vscodeby microsoft

TypeScript doticonstar image 147328 doticonVersion:1.79.2doticon
License: Permissive (MIT)

Visual Studio Code

Support
    Quality
      Security
        License
          Reuse

            vscodeby microsoft

            TypeScript doticon star image 147328 doticonVersion:1.79.2doticon License: Permissive (MIT)

            Visual Studio Code
            Support
              Quality
                Security
                  License
                    Reuse

                      notebookby jupyter

                      Jupyter Notebook doticonstar image 10204 doticonVersion:v7.0.0b4doticon
                      License: Permissive (BSD-3-Clause)

                      Jupyter Interactive Notebook

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                notebookby jupyter

                                Jupyter Notebook doticon star image 10204 doticonVersion:v7.0.0b4doticon License: Permissive (BSD-3-Clause)

                                Jupyter Interactive Notebook
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          Text Mining

                                          Libraries in this group are used for analysis and processing of unstructured natural language. The data, as in its original form aren't used as it has to go through processing pipeline to become suitable for applying machine learning techniques and algorithms.

                                          spaCyby explosion

                                          Python doticonstar image 26383 doticonVersion:v3.2.6doticon
                                          License: Permissive (MIT)

                                          ๐Ÿ’ซ Industrial-strength Natural Language Processing (NLP) in Python

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    spaCyby explosion

                                                    Python doticon star image 26383 doticonVersion:v3.2.6doticon License: Permissive (MIT)

                                                    ๐Ÿ’ซ Industrial-strength Natural Language Processing (NLP) in Python
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              flask-corsby corydolphin

                                                              Python doticonstar image 820 doticonVersion:3.0.10doticon
                                                              License: Permissive (MIT)

                                                              Cross Origin Resource Sharing ( CORS ) support for Flask

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        flask-corsby corydolphin

                                                                        Python doticon star image 820 doticonVersion:3.0.10doticon License: Permissive (MIT)

                                                                        Cross Origin Resource Sharing ( CORS ) support for Flask
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  flaskby pallets

                                                                                  Python doticonstar image 63300 doticonVersion:2.2.5doticon
                                                                                  License: Permissive (BSD-3-Clause)

                                                                                  The Python micro framework for building web applications.

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            flaskby pallets

                                                                                            Python doticon star image 63300 doticonVersion:2.2.5doticon License: Permissive (BSD-3-Clause)

                                                                                            The Python micro framework for building web applications.
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      Testing

                                                                                                      The libraries listed here can be used for unit testing as well as integration testing

                                                                                                      pytestby pytest-dev

                                                                                                      Python doticonstar image 10300 doticonVersion:7.3.2doticon
                                                                                                      License: Permissive (MIT)

                                                                                                      The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                pytestby pytest-dev

                                                                                                                Python doticon star image 10300 doticonVersion:7.3.2doticon License: Permissive (MIT)

                                                                                                                The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          Kit Solution Source

                                                                                                                          gender-biasby kandi1clickkits

                                                                                                                          Python doticonstar image 0 doticonVersion:v1.0.0doticon
                                                                                                                          License: Permissive (MIT)

                                                                                                                          Reading for gender bias

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    gender-biasby kandi1clickkits

                                                                                                                                    Python doticon star image 0 doticonVersion:v1.0.0doticon License: Permissive (MIT)

                                                                                                                                    Reading for gender bias
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              Support

                                                                                                                                              If you need help using this kit, you may reach us at the OpenWeaver Community.

                                                                                                                                              See similar Kits and Libraries