项目
在 GitHub 查看
Liebeck/spacy-sentiws
关于
German sentiment scores with SentiWS as extension for spaCy
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文spacy-sentiws
This package uses the spaCy 3 extensions to add SentiWS as German sentiment score directly into your spaCy pipeline.
Usage
import spacy
from spacy_sentiws import spaCySentiWS
nlp = spacy.load('de_core_news_sm')
nlp.add_pipe('sentiws', config={'sentiws_path': 'data/sentiws/'})
doc = nlp('Die Dummheit der Unterwerfung blüht in hübschen Farben.')
for token in doc:
print('{}, {}, {}'.format(token.text, token._.sentiws, token.pos_))
Installation
- Use pip to install spacy-sentiws
pip install spacy-sentiws
- Download the SentiWS http://pcai056.informatik.uni-leipzig.de/downloads/etc/SentiWS/SentiWS_v2.0.zip and unzip it. The directory
data/sentiwswill be used by default.
Local development
Use develop.py to extend the functionality
How to run the tests
python -m unittest
How to update pip package: https://widdowquinn.github.io/coding/update-pypi-package/
python setup.py sdist bdist_wheel
twine upload dist/PACKAGENAME-VERSION.tar.gz
Contributors
- stereolith (Thanks for upgrading to spaCy 3)
探索相关项目
加载中…