5) Detecting Trends Language in Twitter This sub-project will allow you to practice manipulating dictionaries and files

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

5) Detecting Trends Language in Twitter This sub-project will allow you to practice manipulating dictionaries and files

Post by answerhappygod »

5 Detecting Trends Language In Twitter This Sub Project Will Allow You To Practice Manipulating Dictionaries And Files 1
5 Detecting Trends Language In Twitter This Sub Project Will Allow You To Practice Manipulating Dictionaries And Files 1 (41.12 KiB) Viewed 16 times
python language. show code and output.
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. :) http://htmifive.appspot.com #io2009 #googleio At GWT fireside chat #googleio @khalid0456 No, Lebron is the best #lebron If N is set to 2, then your script should generate a file top_hashtags.txt with the following content (note that in case of ties the order doesn't matter): #googleio 2 #lebron 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply