4. Ethics of AI Data Storage
Activity 4.01: Finding More Latent Prejudices
Solution
- Create the
Activity04.01
directory in theChapter04
directory to store the files for this activity. - Open your Terminal (macOS or Linux) or Command Prompt (Windows), navigate to the
Chapter04
directory, and typejupyter notebook
. - In the Jupyter Notebook, click the
Activity04.01
directory and create a new notebook file with thePython3
kernel. - Create a list of at least 16 words that you think might have a positive or negative prejudice:
words = """sporty nerdy employed unemployed clever stupid latino asian caucasian disabled pregnant introvert extrovert politician florist CEO"""
In the previous code, we added 16 words to our list.
- Define the same classification model that we used in previous exercises:
import spacy nlp = spacy.load('en_core_web_lg') def polarity_good_vs_bad(word): Â Â Â Â """Returns a...