liveBook · Manning

Co-occurrence

As explained in Natural Language Processing in Action, Second Edition

Co-occurrence is the occurrence of linguistic units together or in a shared sequence within a text.

Co-occurrence measures which linguistic units appear together or within a shared sequence. Instead of counting words only across whole documents, it uses nearby context to preserve relationships that help represent meaning. section 6.2.4 section 2.3

The useful shift is to make documents very short, so nearby-word counts become informative. Tokenize and segment sentences, then let large collections of unlabeled text provide the co-occurrence patterns used to learn word embeddings. section 6.2.4

Co-occurrence supports several language-analysis workflows:

  • Compare terms within a dataset to derive meanings and transform bag-of-words or TF–IDF vectors into topic vectors with SVD. section 4.11
  • Learn word embeddings from a large body of text without dictionary definitions, thesauri, or supervised labels. section 6.2.4
  • Avoid treating every token independently, since ignoring co-occurring token sequences can weaken classification, sentiment analysis, and related vector representations. section 2.3

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains the shift from document-level counts to nearby context and self-supervised embeddings, but does not detail the training algorithm.
Examples
Uses short documents, nearby words, tokenized sentences, random text, and large machine-readable corpora as learning settings.
What it assumes
Assumes tokenization and segmentation, while teaching meaning representation without dictionaries, thesauri, or labeled datasets.
What you can do after
Evaluate how context-based counts improve language representations and support embeddings, topic analysis, and semantic search.
How it connects
Connects co-occurrence with bag-of-words, TF–IDF, SVD, topic vectors, word embeddings, classification, sentiment analysis, and semantic search.

Also explained in

Compare how 3 books explain co-occurrence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.