Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhea0 committed Jun 5, 2013
1 parent 83d736c commit c58d49c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 1,860 deletions.
4 changes: 2 additions & 2 deletions sentiment_before.py
Expand Up @@ -6,7 +6,7 @@

files=['negative.txt','positive.txt','obama_tweets.txt']

path='https://github.com/mjhea0/twitter-sentiment-python/blob/master/'
path='https://raw.github.com/mjhea0/twitter-sentiment-python/master/words/'
for file_name in files:
urllib.urlretrieve(path+file_name,file_name)

Expand Down Expand Up @@ -44,9 +44,9 @@
positive_counts.append(positive_counter/word_count)
negative_counts.append(negative_counter/word_count)

print len(positive_counts)

output=zip(tweets_list,positive_counts,negative_counts)


writer = csv.writer(open('tweet_sentiment_before.csv', 'wb'))
writer.writerows(output)

0 comments on commit c58d49c

Please sign in to comment.