Below is a warning message that came up while using “polarity” function of “qdap” package for Sentiment Analysis in R.
Some rows contain double punctuation. Suggested use of `sentSplit` function.
As it sounds obvious with the warning message, there are punctuations in the data that need to be cleaned up before words can be parsed for sentiment analysis.
R line of code that gave error is
> sentiments = polarity(dataframe.name$column.name)
Include cleanup functions as suggested below, before the data is passed to “polarity” function.
> library(tm) > sentiments = polarity(removePunctuation(removeNumbers(tolower (dataframe.name$column.name))))