Articles → NLP → Vectors In Spacy

Vectors In Spacy






What Is A Vector?




[0.12, -0.34, 0.89, 0.01]



Why Do We Need Vectors?







Download The Package




python -m spacy download en_core_web_md



Example


import spacy

nlp = spacy.load("en_core_web_md")

doc = nlp("I like apples")
token = doc[2]

print(token.text)        # apples
print(token.vector)      # numerical vector



Output


Picture showing the output of vectors in spacy



Different Techniques To Convert Text To Numbers


  1. One hot encoding
  2. Bag of words
  3. TF-IDF
  4. Word2vec



Posted By  -  Karan Gupta
 
Posted On  -  Monday, January 19, 2026
 
Updated On  -  Wednesday, February 4, 2026

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250