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
Different Techniques To Convert Text To Numbers
- One hot encoding
- Bag of words
- TF-IDF
- Word2vec
| Posted By - | Karan Gupta |
| |
| Posted On - | Monday, January 19, 2026 |
| |
| Updated On - | Wednesday, February 4, 2026 |