Title: Training Word Vectors on whole corpus?
Tags: nlp;deep-learning;word2vec;word-embedding
Question: I am training word2vec model on my corpus and a friend of mine asked me if it is right to train the word2vec model on the whole corpus? Because when creating word embeddings I am using the whole corpus, so basically I am leaking the testing information to my network in form of these vectors, which is not ideal when training a neural network.
On the contrary, suppose that I am using a pre-trained word embeddings from google or any other source for that matter, if they have used the same document while creating these embedding, which I will be using to test my network, I will leaking the information anyway.
So my question is what is the right way to train the word2vec?
Separating test and train data before creating word vectors?
Creating word vectors on the whole corpus?
Comment: It depends 100 % on what you are planning to do with these vectors.

Comment: I have described the scenario above. I am planning to use it for training deep neural networks



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:05/16/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<nlp><deep-learning><word2vec><word-embedding>', 'Title': 'Training Word Vectors on whole corpus?', 'ViewCount': 67, 'id': 50375211, 'user_AboutMe': '<hr />\n<blockquote>\n<p><code>Too lazy to make difference!</code></p>\n</blockquote>\n<hr />\n<p>The first thing that I wanna see every morning when I open my eyes is Memes. Its the food for my soul.</p>\n<p>Philosophy - <strong>Success comes to those who change with the changing time.</strong></p>\n<p>Also <code>When I get sad, I just stop being sad and be awesome instead</code></p>\n', 'user_AccountId': 7265853.0, 'user_DisplayName': 'WiLL_K', 'user_Reputation': 575.0, 'user_Views': 135.0, 'user_id': 5540592.0}}