{"id":37064765,"url":"https://github.com/oliverguhr/german-sentiment-lib","last_synced_at":"2026-01-14T07:34:20.917Z","repository":{"id":44443341,"uuid":"264870641","full_name":"oliverguhr/german-sentiment-lib","owner":"oliverguhr","description":"An easy to use python package for deep learning-based german sentiment classification.","archived":false,"fork":false,"pushed_at":"2022-10-10T10:17:54.000Z","size":27,"stargazers_count":58,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-27T12:38:19.920Z","etag":null,"topics":["bert-model","deep-learning","german","machine-learning","python-library","sentiment-analysis","sentiment-classification"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/germansentiment/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliverguhr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-18T08:04:57.000Z","updated_at":"2025-08-17T14:41:07.000Z","dependencies_parsed_at":"2022-07-15T16:47:11.489Z","dependency_job_id":null,"html_url":"https://github.com/oliverguhr/german-sentiment-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oliverguhr/german-sentiment-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fgerman-sentiment-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fgerman-sentiment-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fgerman-sentiment-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fgerman-sentiment-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliverguhr","download_url":"https://codeload.github.com/oliverguhr/german-sentiment-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverguhr%2Fgerman-sentiment-lib/sbom","scorecard":{"id":705226,"data":{"date":"2025-08-11","repo":{"name":"github.com/oliverguhr/german-sentiment-lib","commit":"367f8f55d92fd85e6cde8bc59dc8dbad7ec88071"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 2/19 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T06:21:35.858Z","repository_id":44443341,"created_at":"2025-08-22T06:21:35.858Z","updated_at":"2025-08-22T06:21:35.858Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert-model","deep-learning","german","machine-learning","python-library","sentiment-analysis","sentiment-classification"],"created_at":"2026-01-14T07:34:20.242Z","updated_at":"2026-01-14T07:34:20.906Z","avatar_url":"https://github.com/oliverguhr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Downloads](https://pepy.tech/badge/germansentiment)](https://pepy.tech/project/germansentiment)\n\n# German Sentiment Classification with Bert\n\nThis package provides a very simple interface to [detect the sentiment](https://de.wikipedia.org/wiki/Sentiment_Detection) of German texts. It uses the Googles Bert architecture trained on 1.834 million samples. The training data contains texts from various domains like Twitter, Facebook and movie, app and hotel reviews. You can find more information about the dataset and the training process in the [paper](https://www.aclweb.org/anthology/2020.lrec-1.202.pdf).\n\n## Install \n\nTo get started install the package from [pypi](https://pypi.org/project/germansentiment/):\n\n```bash\npip install germansentiment\n```\n\n## Usage\n\n```python\nfrom germansentiment import SentimentModel\n\nmodel = SentimentModel()\n\ntexts = [\n    \"Mit keinem guten Ergebniss\",\"Das ist gar nicht mal so gut\",\n    \"Total awesome!\",\"nicht so schlecht wie erwartet\",\n    \"Der Test verlief positiv.\",\"Sie fährt ein grünes Auto.\"]\n       \nresult = model.predict_sentiment(texts)\nprint(result)\n```\n\nThe code above will output following list:\n\n```python\n[\"negative\",\"negative\",\"positive\",\"positive\",\"neutral\", \"neutral\"]\n```\n\n### Output class probabilities\n\n```python\nfrom germansentiment import SentimentModel\n\nmodel = SentimentModel()\n\nclasses, probabilities = model.predict_sentiment([\"das ist super\"], output_probabilities = True) \nprint(classes, probabilities)\n```\n```python\n['positive'] [[['positive', 0.9761366844177246], ['negative', 0.023540444672107697], ['neutral', 0.00032294404809363186]]]\n```\n\n## Results\n\nIf you are interested in code and data that was used to train this model please have a look at [this repository](https://github.com/oliverguhr/german-sentiment) and our [paper](http://www.lrec-conf.org/proceedings/lrec2020/pdf/2020.lrec-1.201.pdf). Here is a table of the F1 scores that his model achieves on following datasets. Since we trained this model on a newer version of the transformer library, the results are slightly better than reported in the paper.\n\n| Dataset                                                      | F1 micro Score |\n| :----------------------------------------------------------- | -------------: |\n| [holidaycheck](https://github.com/oliverguhr/german-sentiment) |         0.9568 |\n| [scare](https://www.romanklinger.de/scare/)                  |         0.9418 |\n| [filmstarts](https://github.com/oliverguhr/german-sentiment) |         0.9021 |\n| [germeval](https://sites.google.com/view/germeval2017-absa/home) |         0.7536 |\n| [PotTS](https://www.aclweb.org/anthology/L16-1181/)          |         0.6780 |\n| [emotions](https://github.com/oliverguhr/german-sentiment)  |         0.9649 |\n| [sb10k](https://www.spinningbytes.com/resources/germansentiment/) |         0.7376 |\n| [Leipzig Wikipedia Corpus 2016](https://wortschatz.uni-leipzig.de/de/download/german) |         0.9967 |\n| all                                                          |         0.9639 |\n\n## Cite\n\nFor feedback and questions contact me via e-mail or Twitter [@oliverguhr](https://twitter.com/oliverguhr). Please cite us if you found this useful:\n\n```\n@InProceedings{guhr-EtAl:2020:LREC,\n  author    = {Guhr, Oliver  and  Schumann, Anne-Kathrin  and  Bahrmann, Frank  and  Böhme, Hans Joachim},\n  title     = {Training a Broad-Coverage German Sentiment Classification Model for Dialog Systems},\n  booktitle      = {Proceedings of The 12th Language Resources and Evaluation Conference},\n  month          = {May},\n  year           = {2020},\n  address        = {Marseille, France},\n  publisher      = {European Language Resources Association},\n  pages     = {1620--1625},\n  url       = {https://www.aclweb.org/anthology/2020.lrec-1.202.pdf}\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverguhr%2Fgerman-sentiment-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverguhr%2Fgerman-sentiment-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverguhr%2Fgerman-sentiment-lib/lists"}