Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liebeck/spacy-sentiws
German sentiment scores with SentiWS as extension for spaCy
https://github.com/liebeck/spacy-sentiws
nlp spacy spacy-extension spacy-pipeline
Last synced: 2 months ago
JSON representation
German sentiment scores with SentiWS as extension for spaCy
- Host: GitHub
- URL: https://github.com/liebeck/spacy-sentiws
- Owner: Liebeck
- License: mit
- Created: 2018-04-24T15:24:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-26T11:55:42.000Z (about 2 years ago)
- Last Synced: 2024-10-14T14:41:06.795Z (2 months ago)
- Topics: nlp, spacy, spacy-extension, spacy-pipeline
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 36
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# spacy-sentiws
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/Liebeck/spacy-sentiws/master/LICENSE.md)
[![Build Status](https://api.travis-ci.org/Liebeck/spacy-sentiws.svg?branch=master)](https://travis-ci.org/Liebeck/spacy-sentiws)This package uses the [spaCy 3 extensions](https://spacy.io/usage/processing-pipelines#extensions) to add [SentiWS](http://wortschatz.uni-leipzig.de/en/download) as German sentiment score directly into your spaCy pipeline.
## Usage
``` python
import spacy
from spacy_sentiws import spaCySentiWSnlp = 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
1. Use pip to install spacy-sentiws
``` bash
pip install spacy-sentiws
```
2. Download the SentiWS http://pcai056.informatik.uni-leipzig.de/downloads/etc/SentiWS/SentiWS_v2.0.zip and unzip it. The directory `data/sentiws` will be used by default.## Local development
Use develop.py to extend the functionalityHow to run the tests
``` bash
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](https://github.com/stereolith) (Thanks for upgrading to spaCy 3)