Created
September 3, 2022 16:42
-
-
Save JarrydWannenburg/297215335889ed22994c873c5e93a9b8 to your computer and use it in GitHub Desktop.
Google_News_Extraction_Article
This file contains 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
# Create functions to get polarity and subjectivity using TextBlob | |
def getPolarity(text): | |
return round(TextBlob(text).sentiment[0],4) | |
def getSubjectivity(text): | |
return round(TextBlob(text).sentiment[1],4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment