TextLaspeyres
TextLaspeyres is a metric used to quantify changes in the composition of words in texts over time or across documents. Inspired by the Laspeyres price index from economics, it uses a fixed basket of terms derived from a base period or document set. By focusing on the distribution of words rather than raw length, textLaspeyres aims to capture shifts in topics, style, or vocabulary.
In its typical form, let f0_i be the base-period relative frequency of word i, and f1_i the
The method yields a scalar measure that is easy to interpret and decomposable by term: the contribution
Limitations include sensitivity to the choice of base basket, potential instability with rare terms, and the
See also: Laspeyres price index, price indices, corpus linguistics, topic modeling, text similarity.