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

disambiguate doesn't handle words not in vocabulary #34

Open
glicerico opened this issue May 25, 2018 · 0 comments
Open

disambiguate doesn't handle words not in vocabulary #34

glicerico opened this issue May 25, 2018 · 0 comments

Comments

@glicerico
Copy link

To disambiguate(), we currently need a context that is composed of words which exist in the AdaGram model. When this context contains a word that's not in the model vocabulary, disambiguate() returns a KeyError.
Would it be convenient to discard the unknown words and disambiguate with the rest of the context? In the extreme case that no words in the context exist in the model, then we'd be using an empty list, which still returns the prior probabilities of the word...
This may be done with a warning to announce which word(s) from the context are being ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant