Question: Word analysis Read the entire assignment carefully before beginning. This write-up contains both the details of what your program needs to do as well as





Word analysis Read the entire assignment carefully before beginning. This write-up contains both the details of what your program needs to do as well as implementation requirements for how the functionality needs to be implemented. Description There are several fields in computer science that aim to understand how people use language. This can include analyzing the most frequently used words by certain authors, and then going one step further to ask a question such as: "Given what we know about Hemingway's language patterns, do we believe Hemingway wrote this lost manuscript?" In this assignment, we're going to do a basic introduction to document analysis by determining the number of unique words and the most frequently used words in two documents What your program needs to do There is one test file on Moodle HungerGames_edit.txt that contain the full text from Hunger Games Book 1. We have pre-processed the file to remove all punctuation and down- cased all words. Your program needs to read in the.txt file, with the name of the file to open set as a command-line argument. Your program needs to store the unique words found in the file in a dynamically allocated array and calculate and output the following information: The top n words (n is also a command-line argument) and the number of times each word was found The total number of unique words in the file The total number of words in the file The number of array doublings needed to store all unique words in the file Word analysis Read the entire assignment carefully before beginning. This write-up contains both the details of what your program needs to do as well as implementation requirements for how the functionality needs to be implemented. Description There are several fields in computer science that aim to understand how people use language. This can include analyzing the most frequently used words by certain authors, and then going one step further to ask a question such as: "Given what we know about Hemingway's language patterns, do we believe Hemingway wrote this lost manuscript?" In this assignment, we're going to do a basic introduction to document analysis by determining the number of unique words and the most frequently used words in two documents What your program needs to do There is one test file on Moodle HungerGames_edit.txt that contain the full text from Hunger Games Book 1. We have pre-processed the file to remove all punctuation and down- cased all words. Your program needs to read in the.txt file, with the name of the file to open set as a command-line argument. Your program needs to store the unique words found in the file in a dynamically allocated array and calculate and output the following information: The top n words (n is also a command-line argument) and the number of times each word was found The total number of unique words in the file The total number of words in the file The number of array doublings needed to store all unique words in the file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
