At the following link you can find a colab notebook in which i used gensim library to perform Word2Vec representation, training the model on a famous book by Arthur Conan Doyle: A Study In Scarlet ( .txt file attached).
Notebook: https://colab.research.google.com/drive/1ivT8JR7BWOi95WjARpN4maxwSx6AsLTx?usp=sharing