Why no output using Word2Vec?
<p>I have a dataframe <code>DF</code> that looks like</p>

<pre><code>index posts
0     &lt;div class="content"&gt;A number of  &lt;br/&gt;&lt;br/&gt;three  ... &lt;/div&gt;
1     &lt;div class="content"&gt;Stack ... &lt;br/&gt;&lt;br/&gt;overflow  ... &lt;/div&gt;
...
</code></pre>

<p>I then try to tokenize each <code>posts</code> with:</p>

<pre><code>sentences=[]
for post in DF["posts"]:
     sentences += utility.tosentences(post, tokenizer)
</code></pre>

<p>I then run Word2Vec using the below:</p>

<pre><code>logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s',\
level=logging.INFO)

num_features = 100
min_word_count = 7
num_workers = 2
context = 5
downsampling = 1e-5

print "Training model..."
model = word2vec.Word2Vec(sentences,     workers=num_workers, \
        size=num_features, min_count = min_word_count, \
        window = context, sample = downsampling)

model.init_sims(replace=True)

Word2Vec.load()
model_name = "what"
model.save(model_name)
print "finished"
</code></pre>

<p>I then tested the below</p>

<pre><code>model.doesnt_match("travel no Warning health".split())
</code></pre>

<p>However, it didn't produce an output at all</p>

<p>I don't understand the meaning of the large output I got above. Why is this not working?</p>

<p>The function <code>model.doesnt_match()</code> doesn't print anything out; it returns a value. <strong>Print</strong> the returned value to see the output. </p>

<p>If you were copy-pasting from this <a href="http://rare-technologies.com/word2vec-tutorial/" rel="nofollow"><code>word2vec</code> tutorial</a>: It's showing you the output you'd see if you ran these commands in the interactive console. (Also, it assumes that you understand what you're doing.)</p>

python nltk word2vec