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

Adding Word Prediction #863

Closed
cdzech opened this issue Sep 20, 2016 · 4 comments · Fixed by #1209
Closed

Adding Word Prediction #863

cdzech opened this issue Sep 20, 2016 · 4 comments · Fixed by #1209
Labels
difficulty medium Medium issue: required good gensim understanding & python skills wishlist Feature request

Comments

@cdzech
Copy link

cdzech commented Sep 20, 2016

Hi,

I have noticed that, at least for my use case, a crucial feature is missing in the Word2Vec module: Word prediction. There is no function that takes a context as an input and outputs the probability distribution for the center word (in CBOW).

For my project, I implemented such a function. Is there any interest of the community to provide such a method for the users? If so, I would look into porting it.

Best,
Chris

@gojomo
Copy link
Collaborator

gojomo commented Sep 20, 2016

Yes! That capability has occasionally been requested, or been relevant to experiments people want to do, so a PR would be welcome.

@cdzech
Copy link
Author

cdzech commented Sep 22, 2016

Sounds good. I'll need some time, though. I'll get back when I'm ready.

@tmylk tmylk added wishlist Feature request difficulty medium Medium issue: required good gensim understanding & python skills labels Sep 22, 2016
@metalaman
Copy link
Contributor

Are we looking at a language model implementation for this feature?

@gojomo
Copy link
Collaborator

gojomo commented Oct 2, 2016

The Word2Vec model already is trained via implicit word-predictions, so no extra model implementation should be necessary – just providing another way to run the trained model and report the results (across all possible word-predictions).

tmylk pushed a commit that referenced this issue Mar 20, 2017
…. (#1209)

* added function to predict output word in CBOW from context words

* handling negative_sampling case

* added warnings for out-of-vocabulary and not negative sampling cases

* added unit tests for predict_output_word

* updated CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty medium Medium issue: required good gensim understanding & python skills wishlist Feature request
Projects
None yet
4 participants