Created
April 16, 2019 02:43
-
-
Save octoparse/1856de1e0491402e607dcea230caacb1 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
# count if it is a positive word | |
if word in p_list: | |
if word in word_count_positive.keys(): | |
word_count_positive[word] += 1 | |
else: | |
word_count_positive[word] = 1 | |
# else see if it is a negative word | |
elif word in n_list: | |
if word in word_count_negative.keys(): | |
word_count_negative[word] += 1 | |
else: | |
word_count_negative[word] = 1 | |
else: # do nothing | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment