sizerepresents the feature vector size for each word in the corpus when transformed windowsets the context window size specifying the length of the window of words to be taken into account as belonging to singlesimilar context when training min_countspecifies the minimum word frequency value needed across the corpus to consider the word as part of the final vocabulary during training the model sampleused to downsample the effects of words which occur very frequently the following snippet builds word vec embedding model on the documents of our sample corpus remember to tokenize each document before passing it to the model in [ ]from gensim models import word vec wpt nltk wordpuncttokenizer(tokenized_corpus [wpt tokenize(documentfor document in norm_corpusset values for various parameters feature_size word vector dimensionality window_context context window size min_word_count minimum word count sample - downsample setting for frequent words v_model word vec word vec(tokenized_corpussize=feature_sizewindow=window_contextmin_count min_word_countsample=sampleusing tensorflow backend each word in the corpus will essentially now be vector itself of size we can verify the same using the following code in [ ] v_model wv['sky'out[ ]array( - - - ]dtype=float question might arise in your mind now that so farwe had feature vectors for each complete documentbut now we have vectors for each word how on earth do we represent entire documents nowwe can do that using various aggregation and combinations simple scheme would be to use an averaged word vector representationwhere we simply sum all the word vectors occurring in document and then divide by the count of word vectors to represent an averaged word vector for the document the following code enables us to do the same in [ ]def average_word_vectors(wordsmodelvocabularynum_features)feature_vector np zeros((num_features,),dtype="float "nwords for word in wordsif word in vocabularynwords nwords