Skip to content

Automated Extraction of POS, TAG, and Dependency tags? #11623

Discussion options

You must be logged in to vote

You can generally get the labels of a component like this, using the tagger as an example:

labels = nlp.get_pipe("tagger").labels

This should work for the tagger and parser, for example.

The coarse grained tags are Universal Depencies tags, plus SPACE, and do not change based on pipeline.

If you have a component that doesn't have a list of labels, like a Morphologizer or an AttributeRuler, then you can iterate over a bunch of data to pretty reliably get the list of labels. Depending on the specific component there may also be other ways to recover the labels.

Can you clarify how you're using the labels?

Replies: 1 comment 1 reply

Comment options

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

Answer selected by awindsor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage
2 participants