Skip to content

gustavengstrom/spacy-sentiws

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spacy-sentiws

license Build Status

This package uses the spaCy 2.0 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')
sentiws = spaCySentiWS(sentiws_path='data/sentiws/')
nlp.add_pipe(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
pip install spacy-sentiws
  1. Download the SentiWS http://pcai056.informatik.uni-leipzig.de/downloads/etc/SentiWS/SentiWS_v2.0.zip and unzip it.

About

German sentiment scores with SentiWS as extension for spaCy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 95.7%
  • Shell 4.3%