[Tutor] gensim to generate document vectors

Danny Yoo dyoo at hashcollision.org
Mon Aug 17 22:44:06 CEST 2015


>> I'm getting the vocab fine with my code but I can't seem to figure out how
>> to print out the individual sentence vectors, I have looked through the
>> documentation and haven't found much help. Here is what my code looks like
>> so far.

It appears that you're asking this question on Stack Overflow as well as here:

    http://stackoverflow.com/questions/32056080/using-gensims-doc2vec-to-produce-sentence-vectors


By "vector", I am assuming you mean them in the sense described in:

    https://en.wikipedia.org/wiki/Vector_space_model

where a document can be represented in n-dimensional space, where n is
the size of the vocabulary.  (Linear algebra is awesome.  I need to
learn it properly.)


When you mention that you've looked at the documentation, it can help
to be specific and provide links to the material you're using to
learn.  That way, other folks might check those references.


I think you are looking at the following documentation:

    http://rare-technologies.com/doc2vec-tutorial/

    http://radimrehurek.com/gensim/models/doc2vec.html

but I'm not positive.


I think you want to be reading the tutorial around here:

    http://radimrehurek.com/gensim/tut1.html#from-strings-to-vectors

which talks explicitly on using their library to go from strings to
vectors.  It's part of the same library that you're using now, so I
think you want to look at that tutorial there.


As Alan mentions, the topic you're asking is highly specialized, so we
might not be able to provide good answers just because we're not
familiar with the domain.  It's like asking higher-math questions to
an elementary school classroom: sure, we'll try to help, but we might
not be of much help.  :P  I really do think you should be talking to
these folks:

  http://radimrehurek.com/gensim/support.html


More information about the Tutor mailing list