Please enable JavaScript.
Coggle requires JavaScript to display documents.
Consumer Review Lab, FLOWSHART - Coggle Diagram
Consumer Review Lab
-
Random Adjective
Using a for loop, traverse through the string
Every time the code finds a space, check to see if the word has an asterisks.
If the word does have an asterisk, a new string gets a random adjective added to it. Otherwise, the word itself just gets added as is.
-
Sentiment Value
Convert file to a string
Using for loop, traverse through the string for as many times as the string length
If at index i of the string equals a space, remove punctuation from the word and find the sentiment value of the word. Then add that value to the total sentiment value and reset the word
Else, add character (str.substring(i, i+1)) to word variable
Once traversed through whole string, return the total sentiment value
-
-
-