OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Sense2Vec

Sense2Vec is a Python library for loading, querying and training contextually keyed word-vector models. It extends the word2vec approach with representations that distinguish word senses and supports standalone use as well as integration into spaCy pipelines.

Independent OpenViST project profile, based on linked sources.

Sense2Vec — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Sense2Vec when an NLP workflow needs vector-based similarity that distinguishes word senses or multi-word phrases, either as a standalone Python library or within spaCy.

Who it is for

  • NLP developers building semantic similarity or phrase-analysis features.
  • spaCy users who want vectors and nearest-neighbor queries available in a text-processing pipeline.
  • Researchers and practitioners training word vectors on domain-specific text.

Documented uses

  • Load pretrained vectors and retrieve a vector or frequency for a word or sense key.
  • Find similar words and multi-word phrases using contextual vector representations.
  • Integrate sense-aware vectors into a spaCy pipeline.
  • Train sense2vec vectors from raw text with a pretrained spaCy model and GloVe or Word2Vec via fastText.
Before you choose

Requirements & limits

The README says releases are available through pip and pretrained vector files are attached to GitHub releases. It describes version 2.0 for spaCy v3 and directs spaCy v2 users to version 1.0.3 and the v1.x branch.

  • Pretrained model files require local download and extraction; the listed archives range from 573 MB to 4 GB.
  • The spaCy integration differs by major spaCy version: version 2.0 is for spaCy v3, while spaCy v2 uses sense2vec 1.0.3 on the v1.x branch.
  • Custom training requires raw text, a pretrained spaCy model and GloVe or Word2Vec via fastText.
  • The library's sense-key examples include part-of-speech labels, and phrase queries can use part-of-speech tags and entity labels.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Load pretrained vectors and query similar terms

Use a downloaded Sense2Vec model to retrieve a phrase vector and its nearest similar terms.

Before you start

  • Python and the sense2vec package installed.
  • A downloaded and extracted pretrained vector directory.

Steps

  1. Download a pretrained vector archive attached to a GitHub release and extract it.

  2. Load the extracted directory with Sense2Vec().from_disk(...).

  3. Check a sense key such as natural_language_processing|NOUN, retrieve its vector or frequency, and call most_similar(query, n=3).

Expected outcome

A loaded model can return a vector, frequency and nearest-neighbor terms for a sense key.

Guide limitations

  • The 2015 vector archive is listed at 573 MB; the 2019 archive is 4 GB and split into parts.
  • The example depends on a query key being present in the loaded model.
Source-based practical guide

Add Sense2Vec to a spaCy v3 pipeline

Load pretrained vectors into a spaCy v3 pipeline and query phrase-level attributes.

Before you start

  • sense2vec version 2.0 for spaCy v3.
  • spaCy and a loaded spaCy model, such as en_core_web_sm.
  • A downloaded and extracted pretrained vector directory.

Steps

  1. Load the spaCy model with spacy.load(...).

  2. Add the sense2vec component with nlp.add_pipe("sense2vec").

  3. Load vector data into the component with from_disk(...).

  4. Process text and query the phrase span's vector, frequency or most-similar phrases through its extension attributes.

Expected outcome

The pipeline exposes Sense2Vec phrase-level vector and similarity information through spaCy span extensions.

Guide limitations

  • The repository example targets spaCy v3 and recommends adding the component at the end of the pipeline because it needs access to dependency parsing and, if available, named entities.
  • The spaCy v2 path is sense2vec 1.0.3 on the v1.x branch.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
11 October 2026
Original website title
GitHub - explosion/sense2vec: 🦆 Contextually-keyed word vectors · GitHub · Official homepage title · retained in its source language