Skip to main content

A lightweight Python package for loading, analyzing, and visualizing word embeddings.

Project description

WordViz

WordViz is a Python visualization library designed for exploring and visualizing word embeddings. Built on top of popular libraries such as matplotlib, plotly, and gensim, WordViz provides intuitive tools for analyzing embeddings through clustering, similarity exploration, and dimensionality reduction, all wrapped in interactive and customizable plots. With WordViz, users can gain insights into the structure of their word embeddings, making it a valuable tool for researchers and practitioners in natural language processing.

https://pypi.org/project/wordviz/

Main Features

  • Load and explore pretrained embeddings (e.g., GloVe, FastText)
  • Select from a variety of available embeddings
  • Visualize embeddings in 2D with flexible dimensionality reduction options
  • Identify and plot the most similar words to a given token
  • Visualize clusters of related words
  • Interactive plots powered by plotly
  • Support for both light and dark themes

Installation

Install the latest version from PyPI:

pip install wordviz

Notes: Python version compatibility

Currently, wordviz is not compatible with Python 3.13, due to limitations of some key dependencies:

gensim, one of the core libraries used by wordviz, does not yet provide official support or precompiled wheels for Python 3.13.

For proper installation installation, we recommend that you create a virtual environment with Python 3.12, or just use uv:

uv init --python 3.12

The package will be updated as soon as the dependencies are compatible with Python 3.13.

Usage

You can load and manage embeddings though the EmbeddingLoader class, and then visualize them with the Visualizer class.

from wordviz.loading import EmbeddingLoader
from wordviz.plotting import Visualizer

loader = EmbeddingLoader()
loader.load_from_file('path/to/your/embedding/file', 'word2vec')

vis = Visualizer(loader)
vis.plot_embeddings()

You can explore all functionalities through the example notebook provided in the docs/ folder:

👉 View example notebook

Contributing

This project was created as part of my Bachelor's Degree thesis. For now, it remains a personal project and is not yet open to public collaboration.
However, it will be further developed and eventually opened to contributions.

In the meantime, if you want to suggest features or report bugs, feel free to contact me directly.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wordviz-0.1.3.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wordviz-0.1.3-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file wordviz-0.1.3.tar.gz.

File metadata

  • Download URL: wordviz-0.1.3.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Windows/11

File hashes

Hashes for wordviz-0.1.3.tar.gz
Algorithm Hash digest
SHA256 47d83cabaad9c7c3385e37177a9e5d754795116ab60ff7db6f77209f4a782061
MD5 306e42f03f9ef1c53903fc80ae7b0a5a
BLAKE2b-256 23b72d7affe96f05b10809cb05d8ccd5694d1486f1a4df5348f2068eef388a6e

See more details on using hashes here.

File details

Details for the file wordviz-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: wordviz-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Windows/11

File hashes

Hashes for wordviz-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea956d3d7bfd3acfa8b7eace068186dd8f2b84fbc17d955eec1ddbe4f342aaa5
MD5 b4397c2b5c99dd5d9ae3595b9ea18882
BLAKE2b-256 44a4a06da4e0336363ff275b278968651ef3fcc2b746002585ec166e9df0443c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page