Question: Write a program that reads a one-line text message containing common abbreviations and translates the message into English using a set of translations stored in

Write a program that reads a one-line text message containing common abbreviations and translates the message into English using a set of translations stored in a file. For example, if the user enters the text message (y r u l8) the program should print why are you late As a simplification, you can assume that are no punctuation marks. Proceed as follows: a. Build a dictionary with abbreviations as keys and associated texts as values. Read the provided text file abbreviations.txt, each line of which contains an abbreviation and the associated text it. (You should display the list lines to see what a string of this list looks like.). b. Translate a message. Split the message into words. If a word is in the dictionary, replace it by the associated text. Otherwise simply copy the word to the translation. pyton

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!