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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started