Skip to main content

A Doc2Vec based Embedding Model.

Project description

Swarmauri Logo

PyPI - Downloads PyPI - Python Version PyPI - License PyPI - Version


Doc2Vec Embedding

A Gensim-based Doc2Vec implementation for document embedding in the Swarmauri ecosystem. This package provides document vectorization capabilities using the Doc2Vec algorithm.

Installation

pip install swarmauri_embedding_doc2vec

Usage

from swarmauri.embeddings.Doc2VecEmbedding import Doc2VecEmbedding

# Initialize the embedder
embedder = Doc2VecEmbedding(vector_size=3000)

# Prepare your documents
documents = ["This is the first document.", "Here is another document.", "And a third one"]

# Fit and transform documents
vectors = embedder.fit_transform(documents)

# Transform new documents
new_doc = "This is a new document"
vector = embedder.transform([new_doc])

# Save and load the model
embedder.save_model("doc2vec.model")
embedder.load_model("doc2vec.model")

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

swarmauri_embedding_doc2vec-0.6.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

swarmauri_embedding_doc2vec-0.6.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_embedding_doc2vec-0.6.1.tar.gz.

File metadata

  • Download URL: swarmauri_embedding_doc2vec-0.6.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for swarmauri_embedding_doc2vec-0.6.1.tar.gz
Algorithm Hash digest
SHA256 2420ba6071adaaf45eaf09df8447639292b9d5d780c8980309e40722ec9bdefd
MD5 6f04dc2df07dfd0cc8d77cbda88d6247
BLAKE2b-256 d0cff1e771e9facbd28ffc765ad7102ef619887bfc0c0721fd187a903dd06bb3

See more details on using hashes here.

File details

Details for the file swarmauri_embedding_doc2vec-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5c5fbf612fedbc84380da939759e22850739bd69192c47540b8cce34357cdd7
MD5 f2b101da204980f171d4153d0f95697c
BLAKE2b-256 e5bc56934a90808b1d020468f78bc5417df9f27c7b54fba54e7d745edffc34a3

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