File size: 2,338 Bytes
83a3191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2133f67
83a3191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
license: gpl-3.0
---

# reviewRoBERTa-large

This model is a fine-tuned version of [`roberta-large`](https://huggingface.co/FacebookAI/roberta-large) on a large dataset 
of mobile app reviews. The model is designed to understand and process text from mobile app reviews, providing enhanced performance 
for tasks such as feature extraction, sentiment analysis and review summarization from app reviews.

## Model Details

- **Model Architecture**: RoBERTa (Robustly Optimized BERT Approach)
- **Base Model**: `roberta-large`
- **Pre-training Extension**: Mobile app reviews dataset
- **Language**: English

## Dataset

The extended pre-training was performed using a diverse dataset of mobile app reviews collected from various app stores. 
The dataset includes reviews of different lengths, sentiments, and topics, providing a robust foundation for understanding 
the nuances of mobile app user feedback.

## Training Procedure

The model was fine-tuned using the following parameters:

- **Batch Size**: 8
- **Learning Rate**: 2e-5
- **Epochs**: 2

## Usage

### Load the model

```python
from transformers import RobertaTokenizer, RobertaForSequenceClassification

tokenizer = RobertaTokenizer.from_pretrained('quim-motger/reviewRoBERTa-large')
model = RobertaForSequenceClassification.from_pretrained('quim-motger/reviewRoBERTa-large')
```

### Example: Sentiment Analysis

```python
from transformers import pipeline

nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)

review = "This app is fantastic! I love the user-friendly interface and features."
result = nlp(review)

print(result)
# Output: [{'label': 'POSITIVE', 'score': 0.98}]
```

### Example: Review Summarization

```python
from transformers import pipeline

summarizer = pipeline('summarization', model=model, tokenizer=tokenizer)

long_review = "I have been using this app for a while and it has significantly improved my productivity.
The range of features is excellent, and the user interface is intuitive. However, there are occasional
bugs that need fixing."
summary = summarizer(long_review, max_length=50, min_length=25, do_sample=False)

print(summary)
# Output: [{'summary_text': 'The app has significantly improved my productivity with its excellent features and intuitive user interface. However, occasional bugs need fixing.'}]
```