fix sampling table lookup

This commit is contained in:
Simon Suster 2015-05-25 11:10:18 +02:00 committed by Victor Zhong
parent 1aaab7a228
commit 755728dbb0

@ -69,7 +69,7 @@ def skipgrams(sequence, vocabulary_size,
if not wi:
continue
if sampling_table is not None:
if sampling_table[i] < random.random():
if sampling_table[wi] < random.random():
continue
window_start = max(0, i-window_size)