spaCy - Doc.has_vector Property



As the name suggests, this doc property represents a Boolean value which indicates whether a word vector is associated with the object or not.

Example

An example of Doc.has_vector is as follows −

import spacy
nlp_model = spacy.load("en_core_web_sm")
doc = nlp_model("The website is Tutorialspoint.com.")
doc.has_vector

Output

True
spacy_doc_class_contextmanager_and_property.htm
Advertisements