<p>Some modes of the "Paragraph Vector" algorithm (aka <code>Doc2Vec</code> in libraries like Python <code>gensim</code>) will train both doc-vectors and word-vectors into the a shared coordinate space. (Specifically, any of the PV-DM <code>dm=1</code> modes, or the PV-DBOW mode <code>dm=0</code> if you enable the non-default interleaved word-vector training using <code>dbow_words=1</code>.)</p>

<p>In such a case, you <strong>can</strong> compare <code>Doc2Vec</code> doc-vectors with the co-trained word-vectors, with some utility. You can see some examples in the followup paper form the originators of the "Paragraph Vector" algorithm, "<a href="https://arxiv.org/abs/1507.07998" rel="nofollow noreferrer">Document Embedding with Paragraph Vectors</a>". </p>

<p>However, beware that vectors for single words, having been trained in contexts of use, may not have vectors that match what we'd expect of those same words when intended as overarching categories. For example, <code>education</code> as used in many sentences wouldn't necessarily assume all facets/breadth that you might expect from <code>Education</code> as a category-header. </p>

<p>Such single word-vectors might work better than nothing, and perhaps help serve as a bootstrapping tool. But, it'd be better if you had expert-labelled examples of documents belonging to categories of interest. Then you you could also use more advanced classification algorithms, sensitive to categories that wouldn't necessarily be summarized-by (and in a tight sphere around) any single vector point. In real domains-of-interest, that'd likely do better than using single-word-vectors as category-anchors. </p>

<p>For any other non-<code>Doc2Vec</code> method of vectorizing a text, you could conceivably get a comparable vector for a single word by supplying a single-word text to the method. (Even in a <code>Doc2Vec</code> mode that doesn't create word-vectors, like pure PV-DBOW, you could use that model's out-of-training-text inference capability to infer a doc-vector for a single-word doc, for known words.)</p>

<p>But again, such simplified/degenerate single-word outputs might not well match the more general/textured categories you're seeking. The models are more typically used for larger contexts, and narrowing their output to a single word might reflect the peculiarities of that unnatural input case moreso than the usual import of the word in real context. </p>
Compare vectors of a doc and just a word
<p>So, I have to compare vector of article and vector of single word. And I don't have any idea how to do it. Looks like that BERT and Doc2wec good work with long text, Word2vec works with single words. But how to compare long text with just a word?</p>