基于三分类的中文情感分析
Project description
基于三分类的文本情感分析
基于bert模型,能够识别文本postive, neutral, negative三种情感。
安装
pip install bhsenti
使用
import bhsenti
pre = bhsenti.predict("待预测文本")
pre_info = bhsenti.predict_info("待预测文本")
print(pre)
# 积极
print(pre_info)
# {'text': '待预测文本', 'result': '积极', 'classes': 2, 'score': [0.3605044484138489, 0.009216712787747383, 0.6302788257598877]}
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
bhsenti-0.0.2.tar.gz
(14.6 kB
view details)
Built Distribution
bhsenti-0.0.2-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file bhsenti-0.0.2.tar.gz
.
File metadata
- Download URL: bhsenti-0.0.2.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f946fbe416f7bdf11604c4dd137660ea430a39c1b54463ac09aa9f572ff7de2 |
|
MD5 | e1fa9bd284683e0263f9ed401780bd7a |
|
BLAKE2b-256 | 5c9c78a39a782c267e2cab23fbf22261cf3d48535b3a9f6b3abd78378d592490 |
File details
Details for the file bhsenti-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: bhsenti-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd390bfcf918d37b3b14e57b78ff457ee102454085185b6a83eed287e888f148 |
|
MD5 | 8d756b55b50ff09045d322b9fbe78624 |
|
BLAKE2b-256 | 7da2025285145f44f10b255c1cf647fccb771fde490fa87fc568d99020d8e45c |