Closed loretoparisi closed 8 years ago
Word2Vec iterates once over your corpus to do vocabulary-discovery (aka build_vocab()
), then multiple times (controlled by iter
parameter, default 5) for training. So this output doesn't indicate anything wrong to me, unless it goes on forever. (Does it?)
Also, such questions that aren't necessarily bugs or feature-requests are best discussed on the project forum, https://groups.google.com/forum/#!forum/gensim , rather than as Github issues.
@gojomo Thank you I have found it out and solved, I was think it was a bug since times ago there was in the Word2Vec
init an issue on the generators.
My corpus is loaded with a
iterator
like thisWhen I load it to
Word2Vec
the iteration does not stop doing like a loop:If I change the
__iter__
to load just one file likeit works. If I do a simple iterator like
it iterates in the right way.
Do I need in the first case a
raise StopIteration
exit condition? If so, why this does not happen for one for loop in the second case?