Learn Emotion Analysis with R: Perform Sentiment Assessments, Extract Emotions, and Learn NLP Techniques Using R and Shiny
- Length: 552 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2021-06-02
- ISBN-10: 9390684153
- ISBN-13: 9789390684151
- Sales Rank: #5394362 (See Top 100 Books)
Learn to assess textual data and extract sentiments using various text analysis R packages
Key Features
- In-depth coverage on core principles, challenges, and application of Emotion Analysis.
- Includes real-world examples to simplify practical uses of R, Shiny, and various popular NLP techniques.
- Covers different strategies used in Sentiment and Emotion Analysis.
Description
This book covers how to conduct Emotion Analysis based on Lexicons. Through a detailed code walkthrough, the book will explain how to develop systems for Sentiment and Emotion Analysis from popular sources of data, including WhatsApp, Twitter, etc.
The book starts with a discussion on R programming and Shiny programming as these will lay the foundation for the system to be developed for Emotion Analysis. Then, the book discusses essentials of Sentiment Analysis and Emotion Analysis. The book then proceeds to build Shiny applications for Emotion Analysis. The book rounds off with creating a tool for Emotion Analysis from the data obtained from Twitter and WhatsApp.
Emotion Analysis can be also performed using Machine Learning. However, this requires labeled data. This is a logical next step after reading this book.
What you will learn
- Learn the essentials of Sentiment Analysis.
- Learn the essentials of Emotion Analysis.
- Conducting Emotion Analysis using Lexicons.
- Learn to develop Shiny applications.
Who this book is for
This book aspires to teach NLP users, ML engineers, and AI engineers who want to develop a strong understanding of Emotion and Sentiment Analysis. No prior knowledge of R programming is needed. All you need is just an open mind to learn and explore this concept.
Cover Page Title Page Copyright Page Dedication Page About the Author About the Reviewer Acknowledgements Preface Errata Table of Contents Section - 1 1. Getting Started with R Structure Objectives Brief introduction to R language Setting up the R software Obtaining the R software Installing R Invoking R Setting up RStudio Obtaining the RStudio software Installing RStudio Invoking RStudio Introduction to packages Installing packages Installing packages using RStudio GUI Installing packages using CLI Loading libraries Introduction to vector Assigning vectors to variables Checking the type of a vectors Checking the length of a vectors Conducting statistical operations on a vectors Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 2. Simple Operations Using R Structure Objectives Introduction to data frame Creating an empty data frame Creating a Data Frame from vector(s) Renaming column(s) in a data frame Referencing row(s)/column(s) of a data frame Referencing a data frame based on conditions Adding column(s) to a data frame Adding row(s) to a data frame Sorting a data frame Visualizing data in a data frame Histogram Box and Whisker chart Pie chart Scatter plots Reading data from a CSV file Reading data from a database Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 3. Developing Simple Applications in R Structure Objectives Programming conditions and loops in R Functions in R Application: number to words converter Writing our own function trim() function helper() function convert2DigitNumbers() function convert3DigitNumbers() function convertThousands() function convertLakhs() function convertCrores() function number2wordsIndia() function R library for number to words conversion Application: Word Cloud Creating a Word Cloud from structured data Creating a Word Cloud from unstructured data Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms Section - 2 4. Structure of a Shiny Application Structure Objectives Creating a Shiny application using RStudio Structure of a Shiny application Client-side program Displaying title The body of the web page Taking input Displaying output Server-side program Running the application Creating Separate Files for Client-side and Server-side Programs ui.R Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 5. Shiny Application 1 Structure Objectives Designing the user interface The UI for SankhyaSaabdh Coding the user interface Displaying images in Shiny applications Displaying text in Shiny applications Accepting number only input in Shiny applications Displaying the text output in Shiny applications Creating layouts in Shiny applications Coding the server side of SankhyaSaabdh The complete code of SankhyaSaabdh Publishing a Shiny application Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 6. Shiny Application 2 Structure Objectives Creating RMarkdown document Setting up the YAML header Creating the body of the RMarkdown Embedding R code in RMarkdown Writing our First RMarkdown Generating Output from RMarkdown Developing Shiny application ShabdhMegh What We will develop? Creating tabs in Shiny applications Creating radio button in Shiny applications Inputting TEXT files in Shiny applications Server-side Code side code for inputting text file Inputting PDF files in Shiny applications Server-side Code for inputting PDF Files Switching Modes between TEXT file and PDF file What we do before and after a file is input? Creating output when an input file is provided Computing the word frequency Creating the data table output Displaying the Word Cloud Displaying the progress bar Resetting output when a new input file is provided Programming the download button Programming the client-side of the Shiny application Programming the server-side of the Shiny application Programming the RMarkdown Complete code of ShabdhMegh app.R ShabdhMegh.RMD Conclusion Points to Remember Multiple choice questions Answers to MCQs Questions Key terms Section - 3 7. Sentiment Analysis Structure Objectives What is sentiment analysis? Approaches to sentiment analysis Knowledge-based approach Statistical approach Hybrid approach Sentiment knowledge bases in R afinn Lexicon bing Lexicon loughran Lexicon nrc Lexicon Conducting sentiment analysis Extracting words from the text Generating the words frequency Finding sentiment across the text Determine the sentiment of each word Determine the sentiment of each line Separate the counts of positive and negative sentiments Calculate the net sentiments score for each chunk Plot the net sentiments score Determining the contribution of each word in the sentiment score Visualizing words with positive and negative sentiment Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 8. Emotion Analysis Structure Objectives Conducting emotion analysis Reading and cleaning data Removing stop words Word analysis Check diversity of word frequencies Most frequently used words in the text Emotions expressed by the words – visualization 1 Emotions expressed by the words – visualization 2 Emotions expressed by the words – visualization 3 Sentiment flow in the text Finding the most prevalent emotion in the text Further analysis of the document Bigram analysis Trigram analysis Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 9. ZEUSg Structure Objectives Design of ZEUSg Landing page Outputs from ZEUSg Programming ZEUSg Giving credit for using a library Libraries used to develop ZEUSg Creating tabs within a tab Reading the input file The complete code of ZEUSg app.R Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms Section - 4 10. Introduction to Twitter Data Analysis Structure Objectives Introduction to Twitter Twitter Developer Account URL for creating a Twitter Developer Account Creating a Twitter Developer Account Steps for creating an app App approval by Twitter Google Maps API key URL for creating a Google Maps API key Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 11. Emotion Analysis on Twitter Data Structure Objectives A Few Features of Twitter Fetching data from Twitter Library required for fetching tweets Setting up a Twitter account Authenticating the Twitter account Fetching tweets by search string(s) Fetching tweets for a Location Displaying tweets using DT Displaying tweets with their links Analyzing information obtained from Twitter Time Series chart for when tweets were posted Country analysis Place analysis Language analysis User analysis Source analysis Hashtag analysis Location analysis with maps Interactive maps using a leaflet Emotion analysis of tweets Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms 12. Chidiya Structure Objectives Features of Chidiya Landing page Global code Loading the required libraries Global functions Generic function to display a message box Function to fetch the subjects of tweets stored in the Chidiya database Function to fetch the Previously Searched Subjects Function to read the initial set of tweets Function to extract words from tweets Function to extract emotions from tweets Function to save statistics Initialization code Reading the system parameters Setting up the Twitter Account Setting up the database Setting up the Google Maps API Setting up the Lexicon Setting up the data for initial display Server-side code Initiating response to user input Fetching the tweets Making Chidiya responsive Client-side code The complete for code Chidiya Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms Bonus-WhatsApp Chat Analysis Structure Objectives Introduction to WhatsApp How to download data from WhatsApp? Downloading WhatsApp data from Apple iPhones Downloading WhatsApp data from Android phones The structure of WhatsApp chat data Reading WhatsApp chat data using R Visualizing WhatsApp chat data Messages per day Messages per weekday Radar chart Messages per hour Heat map Messages per author Emoji analysis Word analysis Conclusion Points to remember Multiple choice questions Answers to MCQs Questions Key terms Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.