Skip to main content

A package to convert text into embedding vectors using Hugging Face models.

Project description

PyPI version License: MIT Downloads

TextToVector

TextToVector is a Python package designed to convert text into embedding vectors using Hugging Face models. This tool simplifies the process of generating embeddings for any given text, facilitating easy integration into NLP pipelines or machine learning models.

Installation

To install TextToVector, you can use pip:

pip install TextToVector

Usage

TextToVector is straightforward to use in your Python projects. Here's a quick example:

from text_to_vector import TextToVector

t2v = TextToVector(model_name='bert-base-uncased')
text = "def hello_world():\n    print('Hello, world!')"
vector = t2v.text_to_embedding(text)
print("Generated Vector:", vector)

This package is especially useful for applications requiring text representations, such as semantic analysis, information retrieval, or machine learning models where text data needs to be converted into numerical form.

Features

  • Easy generation of embedding vectors from text.
  • Utilizes state-of-the-art models from Hugging Face.
  • Supports customization of model choices.
  • Lightweight and easy to integrate.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

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

TextToVector-0.1.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

TextToVector-0.1.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

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