Question: Overview and Requirements Write a program ( twitter_sort.py ) that merges and sorts two twitter feeds. At a high level, your program is going to

 Overview and Requirements Write a program ( twitter_sort.py ) that merges

Overview and Requirements Write a program ( twitter_sort.py ) that merges and sorts two twitter feeds. At a high level, your program is going to perform the following: 1. Read in two files containing twitter feeds that are sorted in reverse chronological order (most recent first). 2. Merge the twitter feeds in reverse chronological order (most recent first). 3. Write the merged feeds to an output file. 4. Provide some basic summary Information about the files. The names of the files will be passed in to your program via command line arguments. Use the following input files to test your program: weeti.t and tweet2.txt The output of your program includes the following: 1. Console A. The name of the file that contained the most tweets followed by the number of tweets weeted. In the event of a tie, print both filenames along with number of tweets (Note: a file may be empty). B. The five earliest tweets along with the tweeter 2. sorted tweets.txt: the lines from the inputted files sorted in reverse chronological order (most recent tweets first and earliest tweets at the end Program Details File Format Each input file will contain a list of records with one record appearing on each line of the file. The format of a record is as follows: @TWEETER "TWEET" YEAR MONTH DAY HRMN: SC Your job will be to read in each file and for each line in the file, create a record with the above information. In the above format, a tweet is a string that can contain a list of tokens. Also, HR:MN:SC should be treated as a single field of the record, the time. Note: you should remove the "@" symbol from each tweeter's name. Overview and Requirements Write a program ( twitter_sort.py ) that merges and sorts two twitter feeds. At a high level, your program is going to perform the following: 1. Read in two files containing twitter feeds that are sorted in reverse chronological order (most recent first). 2. Merge the twitter feeds in reverse chronological order (most recent first). 3. Write the merged feeds to an output file. 4. Provide some basic summary Information about the files. The names of the files will be passed in to your program via command line arguments. Use the following input files to test your program: weeti.t and tweet2.txt The output of your program includes the following: 1. Console A. The name of the file that contained the most tweets followed by the number of tweets weeted. In the event of a tie, print both filenames along with number of tweets (Note: a file may be empty). B. The five earliest tweets along with the tweeter 2. sorted tweets.txt: the lines from the inputted files sorted in reverse chronological order (most recent tweets first and earliest tweets at the end Program Details File Format Each input file will contain a list of records with one record appearing on each line of the file. The format of a record is as follows: @TWEETER "TWEET" YEAR MONTH DAY HRMN: SC Your job will be to read in each file and for each line in the file, create a record with the above information. In the above format, a tweet is a string that can contain a list of tokens. Also, HR:MN:SC should be treated as a single field of the record, the time. Note: you should remove the "@" symbol from each tweeter's name

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!