Question: The first parameter represents a dictionary in the format produced by read_tweets and the second represents a tweet's text. This function should return the username

The first parameter represents a dictionary in the format produced by read_tweets and the second represents a tweet's text. This function should return the username (in lowercase) of the most likely author of that tweet, based on the hashtags they use. If all hashtags in the tweet are uniquely used by a single user, then return that user's username. Otherwise, return the string 'unknown'.

Hint: For this function, we suggest creating a helper function that will find all hashtags for the users.

detect_author: (Dict[str, List[tuple]], str) -> str

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 Databases Questions!