Views
No views yet
pip install germansentiment1from germansentiment import SentimentModel
2
3model = SentimentModel()
4
5texts = [
6 "Mit keinem guten Ergebniss","Das ist gar nicht mal so gut",
7 "Total awesome!","nicht so schlecht wie erwartet",
8 "Der Test verlief positiv.","Sie fährt ein grünes Auto."]
9
10result = model.predict_sentiment(texts)
11print(result)["negative","negative","positive","positive","neutral", "neutral"]1from germansentiment import SentimentModel
2
3model = SentimentModel()
4
5classes, probabilities = model.predict_sentiment(["das ist super"], output_probabilities = True)
6print(classes, probabilities)['positive'] [[['positive', 0.9761366844177246], ['negative', 0.023540444672107697], ['neutral', 0.00032294404809363186]]]| Dataset | F1 micro Score |
|---|---|
| holidaycheck | 0.9568 |
| scare | 0.9418 |
| filmstarts | 0.9021 |
| germeval | 0.7536 |
| PotTS | 0.6780 |
| emotions | 0.9649 |
| sb10k | 0.7376 |
| Leipzig Wikipedia Corpus 2016 | 0.9967 |
| all | 0.9639 |
@InProceedings{guhr-EtAl:2020:LREC,
author = {Guhr, Oliver and Schumann, Anne-Kathrin and Bahrmann, Frank and Böhme, Hans Joachim},
title = {Training a Broad-Coverage German Sentiment Classification Model for Dialog Systems},
booktitle = {Proceedings of The 12th Language Resources and Evaluation Conference},
month = {May},
year = {2020},
address = {Marseille, France},
publisher = {European Language Resources Association},
pages = {1620--1625},
url = {https://www.aclweb.org/anthology/2020.lrec-1.202}
}