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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file TextToVector-0.1.2.tar.gz.

File metadata

  • Download URL: TextToVector-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for TextToVector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fd3f97a02d103119eb08764bfa393119fc527225da16db0e371d878b21150523
MD5 681ea576b9282bc2f2062f866d7217e4
BLAKE2b-256 c67f5d8b38413ec584a95a05edb232da641fdc5731c50a373232fcf77b738ab7

See more details on using hashes here.

File details

Details for the file TextToVector-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for TextToVector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02d5ed88f59d39ff1f048c360fb51d52f793286f87fc493594ac152d56cec3a6
MD5 5e0107fbfa8bd1226b8e8f9c8ace9756
BLAKE2b-256 e68d63ecd0720a55a5742360730651e3ca91b29c8a4bfb11d8475a9df0e27c96

See more details on using hashes here.

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