Question: **IN JAVA** Ask the user to give you the name of a file (example: XYZ.txt) containing a series of words, one-per-line, and compute the score

**IN JAVA** Ask the user to give you the name of a file (example: XYZ.txt) containing a series of words, one-per-line, and compute the score of every word in the file. Report back to the user the average score of the words in the file. This will allow you to predict the overall sentiment of the phrase represented by words in the file. Consider an average word score above 2.01 as an overall positive sentiment and consider average score below 1.99 to have an overall negative sentiment. As an example, for a file called negTest.txt containing words like this:

**IN JAVA** Ask the user to give you the name of a

file (example: XYZ.txt) containing a series of words, one-per-line, and compute the

It made me want to poke out my eyeballs eyeballs A sample run might look like this: Enter the name of the file with words you want to find the average score for: negTest.txt The average score of words in negTest.txt is 1.9064030684029487 The overall sentiment of negTest.txt is negative It made me want to poke out my eyeballs eyeballs A sample run might look like this: Enter the name of the file with words you want to find the average score for: negTest.txt The average score of words in negTest.txt is 1.9064030684029487 The overall sentiment of negTest.txt is negative

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!