Co-occurrence analysis finds words that appear near one another in a text. Unlike n-gram analysis, which focuses on adjacent sequences, it can connect terms separated by other words. Choose a context window—the number of nearby words to consider—then count word pairings in a co-occurrence matrix. section 5.4 section 5.4.1
A basic workflow is:
- Clean and tokenize the text, then select a context window. section 5.4
- Count which words fall within each other’s windows and record the counts in a matrix. section 5.4
- Inspect frequent pairs as clues to themes, preferences, or issues; check them against the underlying text before drawing conclusions. section 5.4.1
From software updates to performance concerns
Reviews might discuss a software update that “slows down” a device “over time.” These terms need not appear together in one three-word sequence to be related by a co-occurrence analysis. section 5.4
Figure 5.2 Heatmap of the co-occurrence matrix for the top 30 words in customer reviews with English translations—visualizing word associations and relationships to uncover patterns and themes in customer feedback
A heatmap visualizes frequent word associations in customer reviews, with English translations. section 5.4.3
