/ Модель

Характеристики

Контекст
512 токенов
Параметры
136 млн
Лицензия
MIT
Архитектура
bert · dense
Опубликована
2 мар 2022

german-sentiment-bert

Классификация текстаТекст → label5 профессий

Модель на базе BERT определяет тональность немецкоязычных сообщений и отзывов.

410 тыс.скачиваний за 30 дней73лайкавеса обновлены3 мар 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

oliverguhr/german-sentiment-bert — модель классификации тональности немецкоязычных текстов на основе архитектуры Google BERT. Она обучена на 1,834 млн примеров из разных источников: Twitter, Facebook, а также отзывов о фильмах, приложениях и отелях. Модель предназначена для определения тональности текстов и может применяться для анализа публикаций и отзывов на немецком языке.

Модель содержит 136,3 млн параметров и поддерживает контекст до 512 токенов. Для получения лучших результатов входные тексты необходимо предварительно обрабатывать так же, как при обучении; авторы предоставляют пакет Python germansentiment, который включает предобработку и инференс. В README приведены показатели F1 для нескольких наборов данных, в том числе 0,9568 на holidaycheck и 0,9418 на scare. Репозиторий доступен в форматах PyTorch, TensorFlow, Flax, ONNX и Safetensors. Лицензия — MIT.

Сценарии применения

  • определение тональности отзывов об отелях
  • анализ настроений в немецкоязычных публикациях в соцсетях
  • классификация отзывов о фильмах
  • оценка тональности отзывов о приложениях

Ограничения

Для лучших результатов требуется предобработка входа, соответствующая процедуре обучения. Максимальная длина контекста — 512 токенов.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

German Sentiment Classification with Bert

This model was trained for sentiment classification of German language texts. To achieve the best results all model inputs needs to be preprocessed with the same procedure, that was applied during the training. To simplify the usage of the model, we provide a Python package that bundles the code need for the preprocessing and inferencing.

The model uses the Googles Bert architecture and was trained on 1.834 million German-language 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.

Using the Python package

To get started install the package from pypi:

pip install germansentiment
from germansentiment import SentimentModel

model = SentimentModel()

texts = [
    "Mit keinem guten Ergebniss","Das ist gar nicht mal so gut",
    "Total awesome!","nicht so schlecht wie erwartet",
    "Der Test verlief positiv.","Sie fährt ein grünes Auto."]
       
result = model.predict_sentiment(texts)
print(result)

The code above will output following list:

["negative","negative","positive","positive","neutral", "neutral"]

Output class probabilities

from germansentiment import SentimentModel

model = SentimentModel()

classes, probabilities = model.predict_sentiment(["das ist super"], output_probabilities = True) 
print(classes, probabilities)
['positive'] [[['positive', 0.9761366844177246], ['negative', 0.023540444672107697], ['neutral', 0.00032294404809363186]]]

Model and Data

If you are interested in code and data that was used to train this model please have a look at this repository and our paper. Here is a table of the F1 scores that this model achieves on different datasets. Since we trained this model with a newer version of the transformer library, the results are slightly better than reported in the paper.

DatasetF1 micro Score
holidaycheck0.9568
scare0.9418
filmstarts0.9021
germeval0.7536
PotTS0.6780
emotions0.9649
sb10k0.7376
Leipzig Wikipedia Corpus 20160.9967
all0.9639

Cite

For feedback and questions contact me view mail or Twitter @oliverguhr. Please cite us if you found this useful:

@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}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
b1177ff

0 моделей