Access to word embeddings

Does prodigy use word embeddings to do auto annotations? If yes do we have access to those word embeddings?

Thanks much

The word embeddings are part of the spacy model provided to the recipe. If you're using a blank model or one of spacy's provided sm models, there won't be any word embeddings, but the md and lg models contain vectors.

If you load the model with spacy, you can access the vectors through the vocab with nlp.vocab["word"].vector or more generally under nlp.vocab.vectors, see https://spacy.io/api/vectors.

2 Likes

To add to Adriane's comment, if you have your own embeddings and model (fine-tuned transformer, custom word vectors etc.) and want to use that to suggest examples for annotation, you can set up a custom recipe and load in your data however you like. Here are two examples for NER and text classification:

1 Like