Giter Club home page Giter Club logo

Comments (4)

oppsitre avatar oppsitre commented on August 11, 2024 9

You may notice the 'word2vec_inner.pyx' file. This is the code of cython which have been modified by author. You need to compile it at first, then you can import 'train_sentence_topic' defined in it.
Give more hints you may feel useful when running code.

  1. In all three models, author have modified the source code of gensim and included them, so you needn't to install the gensim by yourself.
  2. I failed to compile the word2vec_inner.pyx.pyx in the original folder. Then I only copied the word2vec_inner.pyx and head file to new folder. It succeed this time.
  3. If you have compiled the *.pyx, only import the word2_inner.pyx is enough. You can delete import 'pyximport' that can prevent some errors.
  4. When compiling *.pyx, you may meet the the error of scipy ‘from scipy.... import fabls’, it may happen for the version of scipy. You can change the code, in word2vec_inner.pyx, 'from 'scipy.linalg.blas import fblas' to 'import scipy.linalg.blas as fblas'

from topical_word_embeddings.

akornilo avatar akornilo commented on August 11, 2024 1

Speaking of the cython issue:
When I try to compile word2vec_inner.pyx, I get the following issue:

Error compiling Cython file:
------------------------------------------------------------
...
                k = sentence_len
            for j in range(j, k):
                if j == i or codelens[j] == 0:
                    continue
                if hs:
                    fast_sentence_topic(points[i], codes[i], codelens[i], syn0, syn1, syn0_topic, size, topic[j], _alpha, work)
                                                                                                            ^
------------------------------------------------------------

word2vec_inner.pyx:890:109: Cannot assign type 'uint32_t *' to 'uint32_t'

has anyone seen this before or know how to resolve it?

I already tried the fixes above and it seems like this issue is stopping me from running the code.

from topical_word_embeddings.

Hellokitty8 avatar Hellokitty8 commented on August 11, 2024

I meet the same error.

from topical_word_embeddings.

oppsitre avatar oppsitre commented on August 11, 2024

I also met the same error.

from topical_word_embeddings.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.