semvec/pypi-packages huggingface dataset:
NepaliKit 1.0.1
A Nepali language processing library
License: MIT
Requires Python: >=3.7

NepaliKit
=========

NepaliKit is a Python library for natural language processing tasks in the Nepali language.

Installation
------------

You can install NepaliKit using pip:

    pip install NepaliKit

Features
--------

NepaliKit provides the following features:

- **Tokenization**: Tokenize Nepali text using the SentencePiece tokenizer.
- **Preprocessing**: Clean and preprocess Nepali text data, including removing HTML tags, special characters, and other cleaning tasks.
- **Stopword Management**: Load, add, and remove stopwords from Nepali text.
- **Sentence Operations**: Segment Nepali text into sentences based on punctuation marks.
- **SentencePiece Model Training**: Train custom SentencePiece models for Nepali text data.
- **Utility Functions**: Various utility functions for text processing and manipulation.
- **Integration with PyTorch**: Utilities for integrating with PyTorch for machine learning tasks.

Usage
-----

### Tokenization Example

```python
from NepaliKit.tokenization import SentencePieceTokenizer

text = "नमस्ते, के छ खबर?"
tokenizer = SentencePieceTokenizer()
tokens = tokenizer.tokenize(text)
print(tokens)
```

### Preprocessing Example 

```python
from NepaliKit.preprocessing import remove_html_tags, remove_special_characters

text = "<p>नमस्ते, के छ खबर?</p>"
clean_text = remove_html_tags(text)
clean_text = remove_special_characters(clean_text)
print(clean_text)
```

### Stopword Example 

```python
from NepaliKit.manage_stopwords import load_stopwords, add_stopword, remove_stopword

stopwords = load_stopwords('/path/to/stopword/directory')
add_stopword('नयाँ_स्टापवर्ड')
remove_stopword('कुनै_स्टापवर्ड')
```

License
-----
This project is licensed under the MIT License.

Author
-----
- Prabhash Kumar Jha
- Email: prabhashj07@gmail.com
langchain-mixedbread-ai 0.1.0
An integration package connecting Mixedbread AI and LangChain
License: MIT
Requires Python: <4.0,>=3.8.1

# langchain-mixedbread-ai

This package contains the LangChain integration with Mixedbread AI

## Installation

```bash
pip install -U langchain-mixedbread-ai
```

And you should configure credentials by setting the following environment variables:

* Get a Mixedbread AI api key and set the environment variable `MXBAI_API_KEY` to it or use it as a SDK argument.

## Embeddings

`MixedbreadAIEmbeddings` class exposes embeddings from MixedbreadAI.

```python
from langchain_mixedbread_ai import MixedbreadAIEmbeddings

embeddings = MixedbreadAIEmbeddings(mxbai_api_key="a legit baker id")
embeddings.embed_query("What is the meaning of life?")
```

## Rerank

`MixedbreadAIRerank` class exposes reranker from MixedbreadAI.

```python
from langchain_mixedbread_ai import MixedbreadAIRerank

reranker = MixedbreadAIRerank(mxbai_api_key="a legit baker id", top_n=3)
reranker.rerank(
    query="Who is the author of To Kill a Mockingbird?",
    documents=[
    "To Kill a Mockingbird is a novel by Harper Lee published in 1960. It was immediately successful, winning the Pulitzer Prize, and has become a classic of modern American literature.",
    "The novel Moby-Dick was written by Herman Melville and first published in 1851. It is considered a masterpiece of American literature and deals with complex themes of obsession, revenge, and the conflict between good and evil.",
    "Harper Lee, an American novelist widely known for her novel To Kill a Mockingbird, was born in 1926 in Monroeville, Alabama. She received the Pulitzer Prize for Fiction in 1961.",
    "Jane Austen was an English novelist known primarily for her six major novels, which interpret, critique and comment upon the British landed gentry at the end of the 18th century.",
    "The Harry Potter series, which consists of seven fantasy novels written by British author J.K. Rowling, is among the most popular and critically acclaimed books of the modern era.",
    "The Great Gatsby, a novel written by American author F. Scott Fitzgerald, was published in 1925. The story is set in the Jazz Age and follows the life of millionaire Jay Gatsby and his pursuit of Daisy Buchanan."
  ]
)
```