Skip to main content

A Doc2Vec based Embedding Model.

Project description

Swamauri Logo

PyPI - Downloads GitHub Hits PyPI - Python Version PyPI - License PyPI - swarmauri_embedding_doc2vec


Swarmauri Embedding Doc2vec

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.3.tar.gz (7.1 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.7.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.3.tar.gz
Algorithm Hash digest
SHA256 92b04dca227fce8840b3cac56bb59a398bba388febad78c955e85311f5c4fb32
MD5 2907c58075f003d7cffc87c82486b9ee
BLAKE2b-256 5477b7e6ecfb07667b8ae87729dd0c57691d55b02be37498b33a048b65e60df0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_embedding_doc2vec-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f7f6a212e1a2aaa66da33731b5e96156ee914cd100802ec4e65b41f2c7849a7
MD5 67d2fd3bf2e6e9ed2fd641b0f33b6e8b
BLAKE2b-256 7ea591de12455b3041198d5bb36366727fbffbf10f262b35e1657a971b3b7350

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