semvec/pypi-packages huggingface dataset:
swarmauri_vectorstore_tfidf 0.6.1
A Tfidf based Vector Store and Tfidf Based Embedding Model.
License: Apache-2.0
Requires Python: <3.13,>=3.10

![Swarmauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)

<div align="center">

![PyPI - Downloads](https://img.shields.io/pypi/dm/swarmauri_vectorstore_tfidf)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swarmauri_vectorstore_tfidf)
![PyPI - License](https://img.shields.io/pypi/l/swarmauri_vectorstore_tfidf)
![PyPI - Version](https://img.shields.io/pypi/v/swarmauri_vectorstore_tfidf?label=swarmauri_vectorstore_tfidf&color=green)

</div>

---

# TF-IDF Vector Store

A vector store implementation using TF-IDF (Term Frequency-Inverse Document Frequency) for document embedding and retrieval. This package provides efficient document storage and similarity-based retrieval using the TF-IDF algorithm.

## Installation

```bash
pip install swarmauri_vectorstore_tfidf
```

## Usage

Here's a basic example of how to use the TF-IDF Vector Store:

```python
from swarmauri.vector_stores.TfidfVectorStore import TfidfVectorStore
from swarmauri.documents.Document import Document

# Initialize the vector store
vector_store = TfidfVectorStore()

# Add documents
documents = [
    Document(content="Machine learning basics"),
    Document(content="Python programming guide"),
    Document(content="Data science tutorial")
]
vector_store.add_documents(documents)

# Retrieve similar documents
results = vector_store.retrieve(query="python tutorial", top_k=2)
```

## Want to help?

If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
swarmauri_embedding_tfidf 0.6.1
Tfidf Embedding for Swarmauri
License: Apache-2.0
Requires Python: <3.13,>=3.10

![Swarmauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)

<div align="center">

![PyPI - Downloads](https://img.shields.io/pypi/dm/swarmauri_embedding_tfidf)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swarmauri_embedding_tfidf)
![PyPI - License](https://img.shields.io/pypi/l/swarmauri_embedding_tfidf)
![PyPI - Version](https://img.shields.io/pypi/v/swarmauri_embedding_tfidf?label=swarmauri_embedding_tfidf&color=green)

</div>

---

# TF-IDF Embedding

A TF-IDF (Term Frequency-Inverse Document Frequency) embedding implementation for the Swarmauri SDK, providing document vectorization capabilities.

## Installation

```bash
pip install swarmauri_embedding_tfidf
```

## Usage

```python
from swarmauri_embedding_tfidf.TfidfEmbedding import TfidfEmbedding

# Initialize the embedder
embedder = TfidfEmbedding()

# Prepare documents
documents = ["this is a sample", "another example text", "third document here"]

# Fit and transform documents
vectors = embedder.fit_transform(documents)

# Infer vector for new text
query_vector = embedder.infer_vector("new document", documents)

# Extract features
features = embedder.extract_features()
```

## Want to help?

If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.