English

Generalized Word Shift Graphs: A Method for Visualizing and Explaining Pairwise Comparisons Between Texts

Computation and Language 2021-02-05 v1 Computers and Society Social and Information Networks Physics and Society

Abstract

A common task in computational text analyses is to quantify how two corpora differ according to a measurement like word frequency, sentiment, or information content. However, collapsing the texts' rich stories into a single number is often conceptually perilous, and it is difficult to confidently interpret interesting or unexpected textual patterns without looming concerns about data artifacts or measurement validity. To better capture fine-grained differences between texts, we introduce generalized word shift graphs, visualizations which yield a meaningful and interpretable summary of how individual words contribute to the variation between two texts for any measure that can be formulated as a weighted average. We show that this framework naturally encompasses many of the most commonly used approaches for comparing texts, including relative frequencies, dictionary scores, and entropy-based measures like the Kullback-Leibler and Jensen-Shannon divergences. Through several case studies, we demonstrate how generalized word shift graphs can be flexibly applied across domains for diagnostic investigation, hypothesis generation, and substantive interpretation. By providing a detailed lens into textual shifts between corpora, generalized word shift graphs help computational social scientists, digital humanists, and other text analysis practitioners fashion more robust scientific narratives.

Keywords

Cite

@article{arxiv.2008.02250,
  title  = {Generalized Word Shift Graphs: A Method for Visualizing and Explaining Pairwise Comparisons Between Texts},
  author = {Ryan J. Gallagher and Morgan R. Frank and Lewis Mitchell and Aaron J. Schwartz and Andrew J. Reagan and Christopher M. Danforth and Peter Sheridan Dodds},
  journal= {arXiv preprint arXiv:2008.02250},
  year   = {2021}
}

Comments

20 pages, 7 figures, 2 tables