Question: I need help with this asap I dont know what I am doing wrong. Here is part of the text file. Here is my output:

I need help with this asap I dont know what I am doing wrong.

I need help with this asap I dont know what I amdoing wrong. Here is part of the text file. Here is myoutput: And here is how we are suppose to find the estimatedscore: D ReviewAnalysis.java ) D ReviewAnalysisTest.java E MovieReviews.txt testFile.txt 1 package a6;2 3eimport java.io.File; 4 import java.io.FileNotFoundException; 5 import java.util.Scanner; 7 public classReviewAnalysis -f 9 public static void main(String[] args) 10 kok Goes throughHere is part of the text file.

the process of -reading the file of movie reviews - gettinga 12Here is my output:

13 14 15 16 17 18 19 20 21 score for eachAnd here is how we are suppose to find the estimated score:

word - finding the best scoring word with a count greater than

D ReviewAnalysis.java ) D ReviewAnalysisTest.java E MovieReviews.txt testFile.txt 1 package a6; 2 3eimport java.io.File; 4 import java.io.FileNotFoundException; 5 import java.util.Scanner; 7 public class ReviewAnalysis -f 9 public static void main(String[] args) 10 kok Goes through the process of -reading the file of movie reviews - gettinga 12 13 14 15 16 17 18 19 20 21 score for each word - finding the best scoring word with a count greater than some threshold scoring a few reviews and comparing the computer-generated score with the actual rating * You should go through the main method to see what the overall structure is of *the project. Then, fill in code for the methods that get called. * @param args String lines null; // need to declare outside the try scope for later use // Read the file and put each line in a String array tr 23 24 25 26 27 28 29 30 31 32 linesconvertFileToStringArray("src/a6/MovieReviews.txt"); catch (FileNotFoundException e) { // Report and quit if the file wasn't found. System.out.println("File was not found"); return; // Create three arrays with our known maximum size of 16444 elements. // 1. words: All the words in the reviews // 2. word_score: A word at index x has a total point value at word_score [x] // 3. word_count: A word at index x has a total number of appearances at /I word_count [x] String[] words new String[16444]; // Cheat by knowing # of words in advance. double [] wordScorenew double [16444]; int [] wordCountnew int [16444] 34 35 36 37 38 39 40 41 42 43 // We need to track how many words have been added to the arrays. // As words gets added, this number should go up to match. int numberOfSpacesUsedInWords0; /I This variable is super important. If you don 't know the point of it -stop //-and figure it out 46 47 48 49 50 // Go through each review. For each review // 1. Pull off the movie score from the front of the review /1 2. Go through the text of the review. Process each word by adding to its // score and count. for (int i=0; i

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!