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,
- Download, extract and double-click the kit installer file to install the kit. Do ensure to extract the zip file before running it.
- The installation may take from 2 to 10 minutes based on bandwidth.
- 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.
- To run the app manually, press N when you're prompted and locate the zip file Bias_Detector.zip
- Extract the zip file and navigate to the directory gender-bias-master
- Open a command prompt in the extracted directory gender-bias-master and run the command jupyter notebook.
For other Operating System,
- Install python
- Click here to download the repository
- Extract the zip file and navigate to the directory gender-bias-master
- Open the terminal in the extracted directory gender-bias-master
- Install dependencies by executing the command pip install -r requirements.txt
- 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.
- Locate and open the gender-bias.ipynb notebook from the Jupyter Notebook browser window.
- Execute cells in the notebook by selecting Cell --> Run All from Menu bar
For running it with your text,
- Open letterofRecW file from the location data/input from gender-bias.ipynb location.
- Update text in the letterofRecW file.
- Execute cells in the notebook by selecting Cell --> Run All from Menu bar.
- 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
- While running batch file, if you encounter Windows protection alert, select More info --> Run anyway
- 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.
notebookby jupyter
Jupyter Interactive Notebook
notebookby jupyter
Jupyter Notebook 10204 Version:v7.0.0b4 License: Permissive (BSD-3-Clause)
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
๐ซ Industrial-strength Natural Language Processing (NLP) in Python
spaCyby explosion
Python 26383 Version:v3.2.6 License: Permissive (MIT)
flask-corsby corydolphin
Cross Origin Resource Sharing ( CORS ) support for Flask
flask-corsby corydolphin
Python 820 Version:3.0.10 License: Permissive (MIT)
flaskby pallets
The Python micro framework for building web applications.
flaskby pallets
Python 63300 Version:2.2.5 License: Permissive (BSD-3-Clause)
Testing
The libraries listed here can be used for unit testing as well as integration testing
pytestby pytest-dev
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
pytestby pytest-dev
Python 10300 Version:7.3.2 License: Permissive (MIT)
Kit Solution Source
gender-biasby kandi1clickkits
Reading for gender bias
gender-biasby kandi1clickkits
Python 0 Version:v1.0.0 License: Permissive (MIT)
Support
If you need help using this kit, you may reach us at the OpenWeaver Community.