Question: 3 . ) In main: i . ) Create two empty dictionaries ( emoticons _ to _ ids and ids _ to _ emoticons )

3.) In main:
i.) Create two empty dictionaries (emoticons_to_ids and
ids_to_emoticons)
ii.) Call your load_twitter_dicts_from_file function passing it the file
name and the two dictionaries.
iii.) Print the number of different emoticons found in the data file:
Emoticons: 98
(one space after colon)
iv.) Print the number of different user ID's found in the data file:
UserIDs: 2878
(three spaces after colon)
v.) Next call your find_most_common, passing it the emoticons_to_ids
dictionary. The result should look like this:
:) occurs 871 times
Now pop the most common emoticon from the dictionary and again call
your find_most_common function on the emoticons_to_ids
dictionary. Since the :) is gone a different emoticon will be the most
common.
Repeat this process five times. Your output from all five function calls
should look like this:
:) occurs 871 times
:D occurs 377 times
:( occurs 231 times
;) occurs 219 times
:P occurs 134 times
4.) Verify that your documentation makes sense and that youve added documentation
to each of your functions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!