Question: For Phton language 3. You are to create a decoder program that takes a tweet as input and turns it into an English sentence. A

For Phton language 3.

You are to create a decoder program that takes a tweet as input and turns it into an English sentence. A tweet will contain common acronyms and abbreviations, and your program will need to have a way to decode them (dictionary).

For example) lol => laughing out loud, brb => be right back Provided is a file with common tweet abbreviations and associated meanings, your program is to use this

csv file (tweet_decoder.csv) to create its dictionary.

Start by creating a framework for the program that contains a dictionary with a few abbreviations

such as decoder = { brb : be right back, b4 : before ...}

Ask for a user to input a tweet.

Lookup abbreviations within the tweet, decode and replace them.

Print out the decoded string.

Offer the option to run again.

Your program will need to open up the tweet_decoder.csv file. Make sure that this file is

copied into the same directory where your python file is saved.

Review slide 16 from week 12 (part1, Record example 2) as a reference.

Each line of the CSV file represents a key and a value pair These needs to be added to the

dictionary.

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!