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.7.0.dev8.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file swarmauri_embedding_doc2vec-0.7.0.dev8.tar.gz.

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev8.tar.gz
Algorithm Hash digest
SHA256 6ad77274efc9834861df8c4fa0a4bd6ed4547f32ea01bcdecd13b054753a25b0
MD5 53e9892b77e87471cf9552dad85061ce
BLAKE2b-256 ea7319f607ae6ae24d85299bed52df66051b273d50976425e6ca5c03641e26bf

See more details on using hashes here.

File details

Details for the file swarmauri_embedding_doc2vec-0.7.0.dev8-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev8-py3-none-any.whl
Algorithm Hash digest
SHA256 16bc91b661c92394abe3656de6241392ee930ffa5694739e4eb9c048c9802b50
MD5 974af4193b90a9ab8bf3d4a6c590b3c0
BLAKE2b-256 4463dc0faaaf062ef650570d2e568c0eb3f5f84a575e10961a3fbd651322b8f5

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