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.dev16.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.

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.6.1.dev16.tar.gz
Algorithm Hash digest
SHA256 4bf6e4d441b9008019d2c7d31c72e712814cde730d40a42f99d35ec5c2ac79f3
MD5 5be634d27480ce71a85d95b079841a82
BLAKE2b-256 b8f8312529b5b4fdd4be7608d82b674c15a7b2b32d7ecb76543c746e2f2c1cad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.6.1.dev16-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a2ec9d9bb57bfec0d0d4ae92fc6f6d14cae236b2bc67fe875addb1490315f9
MD5 d179b2f20b5c975d8c1f293d2722ba99
BLAKE2b-256 60237f68a0a884b28f22d0eb5b940cbb3f6250a4a9f6bb328a01183f69cd5e54

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