Skip to content
No description, website, or topics provided.
Jupyter Notebook R
Branch: FirstCommit
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



The process of computationally identifying and categorizing opinions expressed in a piece of text, especially in order to determine whether the writer's attitude towards a particular topic, product, etc. is positive, negative, or neutral


Customer's online comments/feedback from an insurance companies website has been scrapped to run through the sentiment analysis


This is based on the tutorials from following links:


  • Load data to R

  • preprocess data

    • convert to lower: this is to avoid distinguish between words simply on case
    • remove punctuation: punctuation can provide grammatical context which supports understanding. Often for initial analyses we ignore the punctuation
    • remove numbers: numbers may or may not be relevant to our analyses
    • remove stopwords: stop words are common words found in a language. Words like for, of, are etc are common stop word
    • create document term matrix: a document term matrix is simply a matrix with documents as the rows and terms as the columns and a count of the frequency of words as the cells of the matrix
  • Insight through visualization

    • Word cloud
    • Frequency plot
    • Correlation plot
    • Paired word cloud
  • Sentiment Score

    • Load Positive / Negative terms corpus
    • Calculate positive / negative score
    • Classify emotion
    • Classify polarity
    • Visualize
      • Distribution of overall score
      • Distribution of score for a given term
      • Distribution of emotion
      • Distribution of polarity
      • Text by emotion

Related Blog:

You can’t perform that action at this time.