semvec/pypi-packages huggingface dataset:
chinese-keybert 0.1.0
Chinese keyword extraction using transformer-based language models
Requires Python: >=3.6

# Chinese_keyBERT
Chinese_keyBERT is a minimal Chinese keywords extraction library that leverage the contextual embeddings generated from BERT models to extract relevant keywords from the given texts.

## Installation
```
pip install chinese_keybert
```

## Get started
```
from chinese_keybert import Chinese_Extractor
kw_extractor = Chinese_Extractor()
text = [
   '''
渾水創始人：七月開始調查貝殼，因為“好得難以置信” 2021年12月16日，做空機構渾水在社交媒體上公開表示，正在做空美股上市公司貝殼...
'''
]
result = kw_extractor.generate_keywords(text,top_k=5,rank_methods="mmr")
```

## How it works
The core idea behind chinese_keyBERT is to utilize a word segmentation models to segments a piece of text into smaller n-grams and filter the n-grams according to the defined part-of-speech (as some pos are not suitable to be used as a keyword). Then, an embedding model (eg. BERT) is used to encode the text and filtered n_grams into embeddings and using some ranking methods (eg. maximun sum/maximun marginal relevance) to compute the cosine distances betweens the text and n-grams embeddings and rank the keywords according to the scores.

## To-do
- [ ] Documentations
- [ ] Vectorization operations to speed-up processing of multiple documents
- [ ] Add support for other word segmentation, part-of-speech and embeddings model

## Credit
Chinese_keyBERT was largely inspired by [KeyBERT](https://github.com/MaartenGr/KeyBERT), a minimal library for embedding based keywords extractions. Besides, Chinese_keyBERT is also heavily relies on Chinese word segmentation and POS library from [CKIP](https://github.com/ckiplab/ckip-transformers) as well as [sentence-transformer](https://github.com/UKPLab/sentence-transformers) for generating quality embeddings.
yeetcode 0.3.0
Make your own leetcode problems
Requires Python: >=3.8

# Yeetcode

[![PyPI version](
https://badge.fury.io/py/yeetcode.svg
)](https://badge.fury.io/py/yeetcode)
[![CI status](
https://github.com/qianxyz/yeetcode/actions/workflows/ci.yml/badge.svg
)](https://github.com/qianxyz/yeetcode/actions)

> Why leetcode, if you can write your own?

Yeetcode is a leetcode imitation, where you can create your own
declarative problem specifications with YAML, auto-generate a solution
template in Python, fill in your solution, then run against your own
test cases.

## Quick start

### User

1. Create and activate a [virtual environment](
   https://docs.python.org/3/library/venv.html) (highly recommended)
2. Upgrade pip and install yeetcode:
```sh
python -m pip install --upgrade pip
python -m pip install yeetcode
```
3. Create a [problem configuration](./example/README.md)
4. Generate a Python solution template:
```sh
yeetcode template problem.yaml > solution.py
```
5. Work out your solutions in the `.py` file
6. Run against your test cases:
```sh
yeetcode run problem.yaml solution.py
```

### Developer

Clone this repo and install in development mode with test dependencies:
```sh
python -m pip install -e .[tests]
```

## Roadmap

- [x] Create a minimal proof of concept
- [x] Solution files auto-generation
- [x] Multiple methods test routine
- [x] Data structure: singly linked list
- [x] Data structure: binary tree
- [ ] Prettify user messages
- [ ] Docstring field describing problem
- [ ] Problem config documentation
- [ ] Inplace problems with no return