5) Detecting Trends Language in Twitter This sub-project will allow you to practice manipulating dictionaries and files in your python scripts. The goal is to keep track of trendy topics in a sample of Twitter data. You will need two files posted on the course website: twitter_data.txt. WARNING: Some of the tweets in the sample file actually do contain swear words. 5a). Detecting Topic Trends in Twitter One of the services Twitter provides its users is the ability to track the most popular topics. For this part of the assignment you will do something similar. Your task is to keep track of the topics identified by users with the hashtag symbol "#". You will also need to count the frequency of the hashtags you found and provide a ranking of hashtags based on their frequency. The output of your script should be one file, named top_hashtags.txt, with the N most popular hashtags, where N is a parameter to your function. For example, assume this is the content of your twitter_data.txt file: #lebron best athlete of our generation ML 5 Demos! Lots of great stuff to come! Yes, 1'm excited.
