Search code examples
pythonnlpnormalizationword2vecword-embedding

How to normalize word embeddings (word2vec)


I have a pre trained Word2Vec model with embeddings. I need to normalize some embeddings to do analyses with the words. Is there a simple line (or block) of code to do this? I've been searching online but can't find a simple answer.


Solution

  • This will work fine with embeddings

    model.init_sims(replace=True)