1. Learn
  2. /
  3. Courses
  4. /
  5. Natural Language Processing with spaCy

Connected

Exercise

spaCy vocabulary

Word vectors, or word embeddings, are numerical representations of words that allow computers to perform complex tasks using text data. Word vectors are a part of many spaCy models, however, a few of the models do not have word vectors.

In this exercise, you will practice accessing spaCy vocabulary information. Some meta information about word vectors are stored in each spaCy model. You can access this information to learn more about the vocabulary size, word vectors dimensions, etc.

The spaCy package is already imported for your use. In a spaCy model's metadata, the number of words is stored as an element with the "vectors" key and the dimension of word vectors is stored as an element with the "width" key.

Instructions

100 XP
  • Load the en_core_web_md model.
  • Print the number of words in the en_core_web_md model's vocabulary.
  • Print the dimensions of word vectors in the en_core_web_md model.