You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NameError Traceback (most recent call last)
in
3 for line in pos:
4 print(line)
----> 5 sentence_vector = model.embed_sentence(line)
6 pos_arrays[i] = sentence_vector
7 pos_labels[i] = 1
src/sent2vec.pyx in sent2vec.Sent2vecModel.embed_sentence()
src/sent2vec.pyx in sent2vec.Sent2vecModel.embed_sentences()
src/sent2vec.pyx in sent2vec.vector_wrapper.asarray()
NameError: name 'stdvector_base' is not defined
I went to the code of stdvector_base and only see "pass" in the class definition. I added the default constructor but doesn't help to resolve the issue. Any suggestion? This April, I could run it successfully but it cannot work now.
The text was updated successfully, but these errors were encountered:
Had the same issue as well, turns out it was because the input (line in the above example) was an empty Python list. Resolved by filling the list with a placeholder string. Hope that helps!
NameError Traceback (most recent call last)
in
3 for line in pos:
4 print(line)
----> 5 sentence_vector = model.embed_sentence(line)
6 pos_arrays[i] = sentence_vector
7 pos_labels[i] = 1
src/sent2vec.pyx in sent2vec.Sent2vecModel.embed_sentence()
src/sent2vec.pyx in sent2vec.Sent2vecModel.embed_sentences()
src/sent2vec.pyx in sent2vec.vector_wrapper.asarray()
NameError: name 'stdvector_base' is not defined
I went to the code of stdvector_base and only see "pass" in the class definition. I added the default constructor but doesn't help to resolve the issue. Any suggestion? This April, I could run it successfully but it cannot work now.
The text was updated successfully, but these errors were encountered: