title: How to train Word2Vec model on Wikipedia page using gensim?
body: <p>After reading <a href="https://codesachin.wordpress.com/2015/10/09/generating-a-word2vec-model-from-a-block-of-text-using-gensim-python/" rel="nofollow noreferrer">this article</a>, I start to train my own model. The problem is that the author does not make it clear what the <code>sentences</code> in  <code>Word2Vec</code> should be like. </p>
  
  <p>I download the text from a Wikipedia page, as it is written is the article, and I make a list of sentences from it:</p>
  
  <pre><code>sentences = [word for word in wikipage.content.split('.')]
  </code></pre>
  
  <p>So, for example, <code>sentences[0]</code> looks like:</p>
  
  <pre><code>'Machine learning is the subfield of computer science that gives computers the ability to learn without being explicitly programmed'
  </code></pre>
  
  <p>Then I try to train a model with this list:</p>
  
  <pre><code>model = Word2Vec(sentences, min_count=2, size=50, window=10,  workers=4)
  </code></pre>
  
  <p>But the dictionary of the model consists of letters! For example, the output of <code>model.wv.vocab.keys()</code> is:</p>
  
  <pre><code>dict_keys([',', 'q', 'D', 'B', 'p', 't', 'o', '(', ')', '0', 'V', ':', 'j', 's', 'R', '{', 'g', '-', 'y', 'c', '9', 'I', '}', '1', 'M', ';', '`', '\n', 'i', 'r', 'a', 'm', '–', 'v', 'N', 'h', '/', 'P', 'F', '8', '"', '’', 'W', 'T', 'u', 'U', '?', ' ', 'n', '2', '=', 'w', 'C', 'O', '6', '&amp;', 'd', '4', 'S', 'J', 'E', 'b', 'L', '$', 'l', 'e', 'H', '≈', 'f', 'A', "'", 'x', '\\', 'K', 'G', '3', '%', 'k', 'z'])
  </code></pre>
  
  <p>What am I doing wrong? Thanks in advance!</p>