def add_unknown_words(word_vecs, vocab, min_df=1, k=200):
    """
    For words that occur in at least min_df documents, create a separate word vector.
    0.25 is chosen so the unknown vectors have (approximately) same variance as pre-trained ones
    """
    for word in vocab:
        if word not in word_vecs:
            idx = vocab[word]
            word_vecs[idx] = np.random.uniform(-0.25,0.25,k)