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.dev9.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.dev9.tar.gz.

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev9.tar.gz
Algorithm Hash digest
SHA256 02f94638a60bd451102e1a16a8bcf4967cb0e7913fae571da137724baca631e5
MD5 09a390af6ab9ce4f0a2d231a1ec4cf0f
BLAKE2b-256 41d805b014310f349f6114aafd71ffe8a30b06714d1b21a8e363e5dc680a0cfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 e37babf6981cf6cb04d4fb7f6f89efcdbcf78a35a3549a7e4f91064ded9cbcfe
MD5 94de3ef78b25b893969b303e0b803ed3
BLAKE2b-256 1a5da0957f957fe3f8b31bc1662a61e540913ca1fc1c4db39a23999eb30b44a3

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