Skip to content
Discussion options

You must be logged in to vote

This is more for historical reasons than anything, and whether a string is in spacy.symbols only matters for the symbols in spacy.attrs at this point. We haven't removed any symbols to maintain backwards compatibility, but with the string hashes introduced in spacy v2, many of these symbols aren't really needed anymore.

You should always get the same integer from nlp.vocab.strings["case"] for the label you're interested in, so I wouldn't use spacy.symbols for this. If you want to be sure that you're using valid labels, you can refer to the model's labels (nlp.get_pipe("parser").labels) and convert them to integers with nlp.vocab.strings[label]. All internal integer representations of thes…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@adrianeboyd
Comment options

Comment options

You must be logged in to vote
1 reply
@jesusfbes
Comment options

Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage feat / parser Feature: Dependency Parser
3 participants