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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev4.tar.gz
Algorithm Hash digest
SHA256 74457702f9fb827b97afc216ef9a557e7a52d749d9bc4e224053d0fd2c9b5c29
MD5 2f115cd3c4889cd726bd23b4cdb782c6
BLAKE2b-256 bbbd23826facf64c12de6778c936ff92afc309ebcc8ce24d88fa0008e3e2dd07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 9f35c13f597ce309b845ee263880e37e8d74dd0187a7e8130248714e0e02d6eb
MD5 6b7d9372114ce5897c15a19e2e5ea460
BLAKE2b-256 98803fcd0379a7de9dd333b0d6e540fcbf5e0782c81bef35c74f7f63e0158e91

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