Basic Analysis > Text Explorer > Sentiment Analysis
Publication date: 07/08/2024

Image shown hereSentiment Analysis

In the Text Explorer platform, sentiment analysis identifies sentiment terms in documents using lexical analysis and scores documents for positive, negative, and overall sentiment. The analysis assumes that each document is free text with binary sentiment on a single topic. Sentiment Analysis incorporates basic natural language processing (NLP) into the results. For more information about natural language processing, see https://opennlp.apache.org/. If you prefer to not use NLP, deselect the Parse Documents option.

Tip: For an example of Sentiment Analysis, select Help > Sample Data Folder, open Chips.jmp, and run the Text Explorer - Sentiment Analysis table script.

Notes:

In Sentiment Analysis, a word can be assigned to only one class of terms: negation, intensifier, or sentiment.

Negation terms negate the level of the sentiment that is assigned to sentiment words that are preceded by the negation term. See Negation Terms.

Intensifier terms adjust the level of sentiment that is assigned to sentiment words that are preceded by the intensifier term. See Intensifier Terms.

Sentiment terms are terms that have positive or negative sentiment score values assigned to them. See Sentiment Terms.

Sentiment Analysis recognizes some emoticons, or sequences of characters that are treated as a single unit. You can see the built-in emoticons and their default sentiment scores in the Sentiment Terms report or in the Manage Sentiment Terms window.

If you specify a word as a negation, intensifier, or sentiment term and it is already specified as a stop word, the word is temporarily removed as a stop word for as long as the Sentiment Analysis report is open. This temporary removal affects the entire Text Explorer report. The word is restored as a stop word when the Sentiment Analysis report closes.

Image shown hereSentiment Analysis Report

By default, the Sentiment Analysis report in the Text Explorer platform contains one open report: the Sentiment Summary report. The other reports are initially closed.

Figure 12.13 Sentiment Analysis Report 

Sentiment Analysis Report

The Sentiment Analysis report contains the following reports:

Negation Terms

The Negation Terms report contains a list of the negation terms in the current sentiment analysis. Negation terms negate the level of the sentiment that is assigned to sentiment words that are preceded by the negation term. Right-click the list to see a menu of additional options, including the option to remove selected terms. JMP has a built-in list of negation terms. You can add or remove a negation term by hovering over a term in the text box of the Sentiment Summary report. You can also use the Manage Negation Terms option.

Intensifier Terms

The Intensifier Terms report contains a list of the intensifier terms and their corresponding multiplier values. Intensifier terms adjust the level of sentiment that is assigned to sentiment words that are preceded by the intensifier term. Right-click the list to see a menu of additional options, including the option to remove selected terms. JMP has a built-in list of intensifier terms and corresponding multiplier values. You can change the multiplier value for terms in the list. You can add or remove an intensifier term by hovering over a term in the text box of the Sentiment Summary report. You can also use the Manage Intensifier Terms option.

Sentiment Terms

The Sentiment Terms report contains a list of the sentiment terms and their corresponding score values. Sentiment terms are terms that have positive or negative sentiment score values assigned to them. Right-click the list to see a menu of additional options, including the option to remove selected terms. JMP has a built-in list of sentiment terms and corresponding sentiment score values. You can change the sentiment score value for terms in the list.

The Sentiment Terms report also enables you to add new sentiment terms. The Possible Sentiment table contains counts of terms that you might consider adding as sentiment terms. To add a term as a sentiment term, select it in the Possible Sentiment table and click one of the buttons below +Sentiment. To choose a sentiment score value that is not listed, you can edit the score value after you have added it to the list of sentiment terms.

When you select a term in the Possible Sentiment table, documents that contain that term appear on the right side of the Sentiment Terms report. This provides context for how the term is used in the corpus.

Features

The Features report contains options to score features in the corpus. A feature is something that is being described by the sentiment terms. Click the Search button to generate a list of possible feature terms. When you select one or more terms from the Possible Feature table, excerpts of the documents that contain those terms appear in the text box to the right of the table. Click the Score Selected Features button to update the Sentiment Summary report to show the results of scoring the selected feature terms.

Note: If you select the Parse Documents option, the Features report scores words when they occur within the same umbrella clause as a sentiment.

Sentiment Summary

The Sentiment Summary report contains the results of the sentiment analysis based on the current settings. This report contains a Summary table and histogram, a Document Scores table, a Sentiment Terms table, a text box, and a control panel that enables you to add more sentiment and intensifier terms.

The Summary table shows counts and mean scores for the documents, broken down by how the documents were scored. The Mean Score is determined by the setting of the Scoring option. See Sentiment Analysis Report Options. The Summary histogram shows the distribution of the overall sentiment scores of the documents. The histogram is interactive, so you can click on a bar to highlight the corresponding documents in the Document Scores table.

The Document Scores table shows the positive and negative sentiment score sums and means, as well as the overall sentiment score for each document. If you select a row of the table, the text of the corresponding document appears in the text box below the table. If you specify a Score Column, the table contains the values from the scoring column.

Tip: You can hover over the cells in the Document Scores table to see the scoring calculations that were used to produce the table results.

The Sentiment Terms table lists each sentiment term, its score value, and the count of occurrences of the term in the corpus.

Tip: For sentiment terms with multiple words, you can hover over the cells in the Score column to see the calculations that were used to produce the score.

The text box shows the text of documents that are selected in the Document Scores table or the context of terms that are selected in the Sentiment Terms table. When you select a document in the Document Scores table, a list of the sentiments in that document appears to the right of the text box.

Tip: When you hover over a term in the text box that is classified as a negation, intensifier, or sentiment term, a box appears that shows the classification and contains a Remove button. Click the Remove button to quickly remove that term from the list of negation, intensifier, or sentiment terms.

The control panel activates when you select a term in the text box. To add a term as a sentiment term, select it in the text box and click one of the buttons below +Sentiment. To add a term as an intensifier term, select it in the text box and click one of the buttons below ×Intensifier.

Image shown hereSentiment Analysis Report Options

In the Text Explorer platform, the Sentiment Analysis red triangle menu contains the following options:

Scoring

Contains the following options for calculating the Overall Scores for documents:

Scaled

Scores of positive and negative phrases are summed. The sum is then divided by the number of phrases in the document to determine the Overall Score.

Min Max

The Overall Score is calculated as the sum of the maximum positive score and the minimum negative score.

Score Column

Specifies a data table column that contains known information that can be compared with the calculated sentiment. The score column is added to the Document Scores table.

Tip: You can visually compare the Overall Score column and the score column to assess the sentiment scoring.

Parse Documents

Specifies if natural language processing (NLP) is used to parse the documents. For more information about natural language processing, see https://opennlp.apache.org/.

Save Document Scores

Saves the columns from the Document Scores table to new columns in the data table. The new columns contain the positive and negative sentiment score sums and means, as well as the overall sentiment score for each document.

Save Count of Sentiment Scores by Document

Saves a column to the data table for each sentiment term. Each column contains counts of the occurrences of each sentiment term in each document.

Show Negation Terms

Shows or hides the Negation Terms report.

Show Intensifier Terms

Shows or hides the Intensifier Terms report.

Show Sentiment Terms

Shows or hides the Sentiment Terms report.

Show Feature Finder

Shows or hides the Features report.

Show Sentiment Cloud

Shows or hides a word cloud of the sentiment terms in the Sentiment Summary report.

Include Builtin Negation Terms

Specifies if the negation terms used in the sentiment analysis include built-in negation terms or not.

Include Builtin Intensifier Terms

Specifies if the intensifier terms used in the sentiment analysis include built-in intensifier terms or not.

Include Builtin Sentiment Terms

Specifies if the sentiment terms used in the sentiment analysis include built-in sentiment terms or not.

Manage Negation Terms

Shows a window that enables you to add or remove negation terms. The changes made can be applied at the User, Column, and Local levels. You can also specify Local Exceptions that exclude negation terms that are specified in any of the other levels. See Term Options Management Windows.

Manage Intensifier Terms

Shows a window that enables you to add or remove intensifier terms. The changes made can be applied at the User, Column, and Local levels. You can also specify Local Exceptions that exclude intensifier terms that are specified in any of the other levels. See Term Options Management Windows.

Manage Sentiment Terms

Shows a window that enables you to add or remove sentiment terms. The changes made can be applied at the User, Column, and Local levels. You can also specify Local Exceptions that exclude sentiment terms that are specified in any of the other levels. See Term Options Management Windows.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).