Compute a Temporal Word Analogy

Input a word and two years below to compute an analogy. Or just leave the default values to see an example.

The word
in year
is like the word
in year

What is a Temporal Word Analogy?

A temporal word analogy holds when two words share a common meaning at two different points in time. For example, Ronald Reagan was the president of the United States in 1987, but Bill Clinton was the president in 1997. This leads to a temporal word analogy:

reagan in 1987 is like clinton in 1997.

Temporal word analogies can be automatically discovered by using methods from distributional semantics. For every word in the vocabulary, a vector-space representation of its meaning is calculated (for example, using the word2vec algorithm). To compute a temporal word analogy, we start with the vector representation of the first word at the first point in time (e.g. reagan in 1987), and then perform a search at the second point in time (e.g. 1997) to find the word whose vector is closest to the first vector (e.g. clinton). The details about how this works are described in the paper cited below, and is this demo operates on the Python implementation of that method, which is available on GitHub.

Examples of Temporal Word Analogies

I applied the temporal word analogies algorithm to a data set consisting of New York Times articles from the years 1987 through 2007. Below are some examples of the temporal analogies that were discovered:

Word 1 Year A Word 2 Year B Comment
reagan 1987 clinton 1997 (President of the USA)

walkman 1987 ipod 2007 (Technology)

iran_contra 1987 lewinsky 1997 (White House scandal)

GitHub source code

The Python code for computing temporal word analogies is available on GitHub:

Paper at ACL 2017

A full description of temporal word analogies and the method for computing them can be found in the following paper:

Terrence Szymanski. 2017. Temporal Word Analogies: Identifying Lexical Replacement with Diachronic Word Embeddings. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017). (download pdf)

Contact Information

This page and the accompanying code and publications are the work of Terrence Szymanski. For more information on my other work, see my homepage at If you have any enquiries or feedback, feel free to reach out to me on Twitter or email at