hf_mirrors/bert-base-multilingual-uncased-sentiment
Model Introduction
Files & versions
Analysis
You are visiting the mirror address of https://modelers.cn/Changchun_Ascend/bert-base-multilingual-uncased-sentiment. The repo is synchronized in real-time and is only for mirror acceleration access.

bert-base-multilingual-uncased-sentiment

This is a bert-base-multilingual-uncased model finetuned for sentiment analysis on product reviews in six languages: English, Dutch, German, French, Spanish, and Italian. It predicts the sentiment of the review as a number of stars (between 1 and 5).

This model is intended for direct use as a sentiment analysis model for product reviews in any of the six languages above or for further finetuning on related sentiment analysis tasks.

Example

使用openmind接口

>>> from openmind import pipeline
>>> pipe = pipeline('text-classification', model=model_path, device=device)
>>> print(pipe("I like you. I love you"))
{'label': '5 stars', 'score': 0.7865718007087708}

调用example下inference.py

cd examples
python inference.py

Training data

Here is the number of product reviews we used for finetuning the model:

LanguageNumber of reviews
English150k
Dutch80k
German137k
French140k
Italian72k
Spanish50k

Accuracy

The fine-tuned model obtained the following accuracy on 5,000 held-out product reviews in each of the languages:

  • Accuracy (exact) is the exact match for the number of stars.
  • Accuracy (off-by-1) is the percentage of reviews where the number of stars the model predicts differs by a maximum of 1 from the number given by the human reviewer.
LanguageAccuracy (exact)Accuracy (off-by-1)
English67%95%
Dutch57%93%
German61%94%
French59%94%
Italian59%95%
Spanish58%95%