Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'LabeledSentence' #1886

Closed
thepurpleowl opened this issue Feb 8, 2018 · 1 comment
Closed

cannot import name 'LabeledSentence' #1886

thepurpleowl opened this issue Feb 8, 2018 · 1 comment
Labels
bug Issue described a bug difficulty easy Easy issue: required small fix

Comments

@thepurpleowl
Copy link

Description

LabeledSentence is not being imported from gensim.models.doc2vec.

from gensim.models.doc2vec import LabeledSentence

the error I am getting is
cannot import name 'LabeledSentence'

@menshikh-iv menshikh-iv added bug Issue described a bug difficulty easy Easy issue: required small fix labels Feb 8, 2018
@menshikh-iv
Copy link
Contributor

menshikh-iv commented Feb 8, 2018

@thepurpleowl hello, thanks for the report, right now you can use

from gensim.models.deprecated.doc2vec import LabeledSentence (FYI this is deprecated stuff),
or better use
from gensim.models.doc2vec import TaggedDocument

CC: @manneshiva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue described a bug difficulty easy Easy issue: required small fix
Projects
None yet
Development

No branches or pull requests

2 participants