You are here: Tools > Lexical Analysis > Lexical Analysis

Lexical Analysis: Basics

IN-SPIRE enables the lexical analysis of documents in several different ways. For example, you can measure affect, the emotional content of documents, and see which affect-bearing words occur in a document. Open the Document Viewer and verify that SettingsSettings button> Highlights Include Lexicon Terms is checked. For more information see Document Viewer: Basics.


After the dataset has been measured using a lexicon, each tab on the Lexical Analysis window presents a different view of the lexical scores.

Tab Axes Compare Comparison Form
Charged Terms 1 Keywords, Extracted Entities, Groups Quick calculation of scores for items as measured against the full set of documents.  
Scores 1 Documents, Groups Distribution of scores Stacked histogram
Terms 1 Groups Terms which have contributed to affect scores and the groups in which they occur. Lists, excerpts
Rose Plots all Documents, Groups Relationship between the scores on all axes in the lexicon. Dataset and highlighted groups are characterized by clustering documents by similarity. "Rose petal" visualization
Comparison 1 Groups The top 25% and bottom 25% of scores of one or more groups vs. a baseline. "red/green", Histogram

Accessing Lexical Analysis

To open Lexical Analysis, on the main toolbar, click on More (the green plus) and from the menu select Lexical Analysis.

lexical analysis on the More menu

Alternatively, from the main menubar choose Tools >Lexical Analysis buttonLexical Analysis. The Lexical Analysis window opens to display the Scores pane, which appears like this, if no measurements have been made:

Lex scores blank

When the lexical content of documents in a dataset is measured, the content of each document is compared to each axis in the chosen measurement lexicon to determine its scores. Lexicons usually contain at least two axes, each containing a list of words. The Positive-Negative lexicon, for example, has two axes, "Positive," containing positive affect-bearing words, and "Negative," which contains negative affect-bearing words. As of version 5.7.2, lexicons are not required to be paired.

Measuring Lexical Content of Documents

  1. Click on the Measure with Lexicon button, or from the main menu choose Settings > Measure with Lexicon. If the Lexical Analysis tool is not open, choose Settings > Measure with Lexicon to open the tool and the Measure with Lexicon window. The Measure with Lexicon window displays a list of the lexicons found in INSPIRE\DatasetRoot\config\HHX\EvimAffect\Lexicons.

    A number of lexicons are distributed with IN-SPIRE, and you may also create your own lexicons using the Lexicon Editor.
    Measure with Lexicon window
  2. Select one of the lexicons by clicking on it, and then click Measure. The lexical content of all of the documents in the dataset is measured using the words in the selected lexicon.
    info icon Because all documents will be scored and scores are saved with the dataset, measuring the lexical content of the dataset once is sufficient, unless you want to measure it using a different lexicon. The scores from the last measurement overwrite any scores saved previously.