Question: I have Part 1 completed. I need help on Part 2 and/or Part 3 input.txt file is filled with thousands of random words. upload your

I have Part 1 completed. I need help on Part 2 and/or Part 3

I have Part 1 completed. I need help on Part 2 and/or

Part 3 input.txt" file is filled with thousands of random words. upload

input.txt" file is filled with thousands of random words. upload your files. Create a "start.html" file that has a single button to Begin the analysis. Perform the analysis as described below. The button should link to a file named "analyze.php". Part 1-Word frequency Use the "input.txt" file posted on Google drive. Read this file into a data structure of your choice. It is a single line of comma separated words. Create an associative array that holds a count for each word (use the word as an index into the array). Count how many times each word occurs in the "input.txt" file. Then, you need to figure out a percentage for each word. Write your results to a file "word_frequency.txt". It should have the following format astounding :24:2.39% autocrosses : 57: 3 . 479 The first field is the word, the second field is the count from your associative array, and the third field is the frequency of the word. (The values above are made up!. Your file MUST BE SORTED. There are functions in PHP to sort an associative array by key.(ksort()) You should also print this information to the screen in a table. The table should also be sorted. Part 2 Misspelled Words Take the list of words provided in "input.txt" (include duplicates). Then, iterate over each word, and 10% of the time, change the current letter (we are adding typos to the words). You can use the rand(1,100) function. If it provides a value 10, mutate your letter. If it provides a value > 10, do not mutate. Print the list of words to an html table (sorted). Also, write these values to a file "misspelled.txt". Use the format: word1,word2, word3, word4,., finalWord n input.txt" file is filled with thousands of random words. upload your files. Create a "start.html" file that has a single button to Begin the analysis. Perform the analysis as described below. The button should link to a file named "analyze.php". Part 1-Word frequency Use the "input.txt" file posted on Google drive. Read this file into a data structure of your choice. It is a single line of comma separated words. Create an associative array that holds a count for each word (use the word as an index into the array). Count how many times each word occurs in the "input.txt" file. Then, you need to figure out a percentage for each word. Write your results to a file "word_frequency.txt". It should have the following format astounding :24:2.39% autocrosses : 57: 3 . 479 The first field is the word, the second field is the count from your associative array, and the third field is the frequency of the word. (The values above are made up!. Your file MUST BE SORTED. There are functions in PHP to sort an associative array by key.(ksort()) You should also print this information to the screen in a table. The table should also be sorted. Part 2 Misspelled Words Take the list of words provided in "input.txt" (include duplicates). Then, iterate over each word, and 10% of the time, change the current letter (we are adding typos to the words). You can use the rand(1,100) function. If it provides a value 10, mutate your letter. If it provides a value > 10, do not mutate. Print the list of words to an html table (sorted). Also, write these values to a file "misspelled.txt". Use the format: word1,word2, word3, word4,., finalWord n

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!