clear-bow-0.2
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | clear-bow-0.2 |
| نام | clear-bow |
| نسخه کتابخانه | 0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Sam Hardy |
| ایمیل نویسنده | samhardyhey@gmail.com |
| آدرس صفحه اصلی | https://github.com/samhardyhey/clear-bow |
| آدرس اینترنتی | https://pypi.org/project/clear-bow/ |
| مجوز | - |
## Clear BOW
### Overview
A cheap model that takes a formatted dictionary as input, and pushes word frequencies through either a softmax (multi-class) or sigmoid (multi-label) function, to produce label "probabilities". Useful for bootstrapping classifications with raw terminology lists.
### Install
Via pip:
```sh
pip install clear_bow
```
Or clone directly:
```sh
git clone https://github.com/samhardyhey/clear-bow
cd clear_bow
pip install .
```
### Usage
```python
from clear_bow.classifier import DictionaryClassifier
# define, instantiate, call
super_dict = {
"regulation": ["asic", "government", "federal", "tax"],
"contribution": ["contribution", "concession", "personal", "after tax", "10%", "10.5%"],
"covid": ["covid", "lockdown", "downturn", "effect"],
"retirement": ["retire", "house", "annuity", "age"],
"fund": ["unisuper", "aus super", "australian super", "sun super", "qsuper", "rest", "cbus"],
}
# multi-class/label options available
dc = DictionaryClassifier(label_dictionary=super_dict)
dc.predict_single("A 10% contribution is not enough for a well balanced super fund!")
# {'regulation': 0.0878,
# 'contribution': 0.6488,
# 'covid': 0.0878,
# 'retirement': 0.0878,
# 'fund': 0.0878}
```
See tests for additional usage.
### Tests
Simple pytesting via:
```sh
pytest
```
Multi-venv tox testing via:
```sh
tox
```
### Dist
- Update version within `setup.py`
- Create dist `.whl` and `.tar` archives via:
```py
python setup.py sdist bdist_wheel
```
Push to main pypi repo via:
```py
twine upload dist/*
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.22.2 | numpy |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl clear-bow-0.2:
pip install clear-bow-0.2.whl
نصب پکیج tar.gz clear-bow-0.2:
pip install clear-bow-0.2.tar.gz