View gensim_word2vec_procrustes_align.py
# Code originally ported from HistWords <https://github.com/williamleif/histwords> by William Hamilton <wleif@stanford.edu>. | |
def align_gensim_models(models, words=None): | |
""" | |
Returns the aligned/intersected models from a list of gensim word2vec models. | |
Generalized from original two-way intersection as seen above. | |
Also updated to work with the most recent version of gensim | |
Requires reduce from functools | |