Question: #Create a Keyword Sentiment Analyzer #Tokenize your documents using the Stanford CoreNLP or Apache OpenNLP package ( See NLP. R on Moodle ) #Create a

 #Create a Keyword Sentiment Analyzer #Tokenize your documents using the Stanford

#Create a Keyword Sentiment Analyzer #Tokenize your documents using the Stanford CoreNLP or Apache OpenNLP package ( See NLP. R on Moodle ) #Create a function called "sentiment (doc )" that takes a documents as it's input and returns a sentiment score by summing the number of positive and negative words in a document. The final score=number_of_positive_words - number_of_negative_words. #Useful functions for this lab: #tokenizedwords %in% positivewordlist : This line will check the individual words membership in the positivewordlist variable. It returns a boolean vector. #which (booleanvector ) : This function returns the vector locations with TRUE values in a boolean vector #length (vectorlocations) : This function returns the number of elements in a vector #Come up with some documents of your own to test doc

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 Mathematics Questions!