- spaCy Tutorial
- spaCy - Home
- spaCy - Introduction
- spaCy - Getting Started
- spaCy - Models and Languages
- spaCy - Architecture
- spaCy - Command Line Helpers
- spaCy - Top-level Functions
- spaCy - Visualization Function
- spaCy - Utility Functions
- spaCy - Compatibility Functions
- spaCy - Containers
- Doc Class ContextManager and Property
- spaCy - Container Token Class
- spaCy - Token Properties
- spaCy - Container Span Class
- spaCy - Span Class Properties
- spaCy - Container Lexeme Class
- Training Neural Network Model
- Updating Neural Network Model
- spaCy Useful Resources
- spaCy - Quick Guide
- spaCy - Useful Resources
- spaCy - Discussion
spaCy - Doc.vector Property
This doc property represents a real-valued meaning. The default value is an average of the token vectors.
Example 1
An example of Doc.vector property is as follows −
import spacy nlp_model = spacy.load("en_core_web_sm") doc = nlp_model("The website is Tutorialspoint.com.") doc.vector.dtype
Output
dtype('float32')
Example 2
An another example of Doc.vector property is as follows −
doc.vector.shape
Output
The output of the code is as follows −
(96,)
spacy_doc_class_contextmanager_and_property.htm
Advertisements