Created
June 26, 2018 20:05
-
-
Save seangtkelley/7d511f823dcea39c897d5ea848c236c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cachedStopWords = stopwords.words("english") | |
punct = set(string.punctuation) | |
female_text = ' '.join(female_titles) | |
male_text = ' '.join(male_titles) | |
female_text = ''.join(ch for ch in female_text if ch not in punct) | |
male_text = ''.join(ch for ch in male_text if ch not in punct) | |
female_text = ' '.join([word for word in female_text.split() if word not in cachedStopWords]) | |
male_text = ' '.join([word for word in male_text.split() if word not in cachedStopWords]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment