This is the implementation of Word Mover's Distance (WMD) in the following paper:
Matt J. Kusner, Yu Sun, Nicholas I. Kolkin, Kilian Q. Weinberger, "From Word Embeddings to Document Distances," ICML (2015).
WMD is a special case of Wasserstein distance.
Related blog post: Word Mover’s Distance as a Linear Programming Problem