
# Note

BERT based sentiment analysis, finetune based on https://huggingface.co/IDEA-CCNL/Erlangshen-Roberta-330M-Sentiment .

The model trained on **hotel human review chinese dataset**.

# Usage

```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline

MODEL = "tezign/Erlangshen-Sentiment-FineTune"

tokenizer = AutoTokenizer.from_pretrained(MODEL)

model = AutoModelForSequenceClassification.from_pretrained(MODEL, trust_remote_code=True)

classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)

result = classifier("很好，干净整洁，交通方便。")

print(result)

"""
print result
>> [{'label': 'Positive', 'score': 0.989660382270813}]
"""
```

# Evaluate
We compared and evaluated the performance of **Our finetune model** and the **Original Erlangshen model** on the **hotel human review test dataset**(5429 negative reviews and 1251 positive reviews).

The results showed that our model substantial improved the precision and recall of positive reviews:

```text
Our finetune model:
              precision    recall  f1-score   support

    Negative       0.99      0.98      0.98      5429
    Positive       0.92      0.95      0.93      1251

    accuracy                           0.97      6680
   macro avg       0.95      0.96      0.96      6680
weighted avg       0.97      0.97      0.97      6680

======================================================

Original Erlangshen model:
              precision    recall  f1-score   support

    Negative       0.81      1.00      0.90      5429
    Positive       0.00      0.00      0.00      1251

    accuracy                           0.81      6680
   macro avg       0.41      0.50      0.45      6680
weighted avg       0.66      0.81      0.73      6680
```
{"language": "zh", "tags": ["sentiment-analysis", "pytorch"], "widget": [{"text": "\u623f\u95f4\u975e\u5e38\u975e\u5e38\u5c0f\uff0c\u5185\u7a97\uff0c\u7279\u522b\u4e0d\u900f\u6c14\uff0c\u56e0\u4e3a\u591c\u91cc\u8d70\u5eca\u706f\u5149\u662f\u4eae\u7684\uff0c\u5185\u7a97\u5bf9\u7740\u8d70\u5eca\uff0c\u7a97\u5e18\u53c8\u4e0d\u80fd\u5b8c\u5168\u62c9\u6b7b\uff0c\u600e\u4e48\u90fd\u4f1a\u6709\u4e00\u9053\u5149\u5c04\u8fdb\u6765\u3002"}, {"text": "\u5c3d\u5feb\u6709\u6d17\u8863\u623f\u5c31\u597d\u4e86\u3002"}, {"text": "\u5f88\u597d\uff0c\u5e72\u51c0\u6574\u6d01\uff0c\u4ea4\u901a\u65b9\u4fbf\u3002"}, {"text": "\u5e72\u51c0\u6574\u6d01\u5f88\u597d"}]}
transformers pytorch safetensors bert text-classification sentiment-analysis zh autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #safetensors #bert #text-classification #sentiment-analysis #zh #autotrain_compatible #endpoints_compatible #region-us 


# Note

BERT based sentiment analysis, finetune based on URL .

The model trained on hotel human review chinese dataset.

# Usage



# Evaluate
We compared and evaluated the performance of Our finetune model and the Original Erlangshen model on the hotel human review test dataset(5429 negative reviews and 1251 positive reviews).

The results showed that our model substantial improved the precision and recall of positive reviews:


# Note

BERT based sentiment analysis, finetune based on URL .

The model trained on hotel human review chinese dataset. # Usage # Evaluate
We compared and evaluated the performance of Our finetune model and the Original Erlangshen model on the hotel human review test dataset(5429 negative reviews and 1251 positive reviews).

The results showed that our model substantial improved the precision and recall of positive reviews:
TAGS
#transformers #pytorch #safetensors #bert #text-classification #sentiment-analysis #zh #autotrain_compatible #endpoints_compatible #region-us 
 # Note

BERT based sentiment analysis, finetune based on URL .

The model trained on hotel human review chinese dataset. # Usage # Evaluate
We compared and evaluated the performance of Our finetune model and the Original Erlangshen model on the hotel human review test dataset(5429 negative reviews and 1251 positive reviews).

The results showed that our model substantial improved the precision and recall of positive reviews:
passage: TAGS
#transformers #pytorch #safetensors #bert #text-classification #sentiment-analysis #zh #autotrain_compatible #endpoints_compatible #region-us 
# Note

BERT based sentiment analysis, finetune based on URL .

The model trained on hotel human review chinese dataset.# Usage# Evaluate
We compared and evaluated the performance of Our finetune model and the Original Erlangshen model on the hotel human review test dataset(5429 negative reviews and 1251 positive reviews).

The results showed that our model substantial improved the precision and recall of positive reviews: