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

token probabilities are not included #348

Open
dakinggg opened this issue Apr 21, 2021 · 1 comment
Open

token probabilities are not included #348

dakinggg opened this issue Apr 21, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@dakinggg
Copy link
Collaborator

It seems the config isn't quite right to include token probabilities. I'm not 100% sure of the solution, but this issue should help (explosion/spaCy#6388 (comment)). The vocab files include the probabilities, but I guess that isn't enough.

@dakinggg dakinggg added the bug Something isn't working label Apr 21, 2021
@dakinggg
Copy link
Collaborator Author

This is how you would add the probabilities from the base spacy models

import spacy
from spacy.lookups import load_lookups
nlp = spacy.load("en_core_web_sm")
lookups = load_lookups("en", ["lexeme_prob"])
nlp.vocab.lookups.add_table("lexeme_prob", lookups.get_table("lexeme_prob"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant