quim-motger commited on
Commit
e788413
1 Parent(s): f18df0a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -3
README.md CHANGED
@@ -1,3 +1,67 @@
1
- ---
2
- license: gpl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gpl-3.0
3
+ ---
4
+
5
+ # reviewXLNet-base-cased
6
+
7
+ This model is a fine-tuned version of [`xlnet-base-cased`](https://huggingface.co/xlnet-base-cased) 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.
8
+
9
+ ## Model Details
10
+
11
+ - **Model Architecture**: XLNet (Generalized Autoregressive Pretraining for Language Understanding)
12
+ - **Base Model**: `xlnet-base-cased`
13
+ - **Pre-training Extension**: Mobile app reviews dataset
14
+ - **Language**: English
15
+
16
+ ## Dataset
17
+
18
+ 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.
19
+
20
+ ## Training Procedure
21
+
22
+ The model was fine-tuned using the following parameters:
23
+
24
+ - **Batch Size**: 16
25
+ - **Learning Rate**: 3e-5
26
+ - **Epochs**: 4
27
+
28
+ ## Usage
29
+
30
+ ### Load the model
31
+
32
+ ```python
33
+ from transformers import XLNetTokenizer, XLNetForSequenceClassification
34
+
35
+ tokenizer = XLNetTokenizer.from_pretrained('quim-motger/reviewXLNet-base-cased')
36
+ model = XLNetForSequenceClassification.from_pretrained('quim-motger/reviewXLNet-base-cased')
37
+ ````
38
+
39
+ ### Example: Sentiment Analysis
40
+
41
+ ```python
42
+ from transformers import pipeline
43
+
44
+ nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
45
+
46
+ review = "This app is fantastic! I love the user-friendly interface and features."
47
+ result = nlp(review)
48
+
49
+ print(result)
50
+ # Output: [{'label': 'POSITIVE', 'score': 0.98}]
51
+ ```
52
+
53
+ ### Example: Review Summarization
54
+
55
+ ```python
56
+ from transformers import pipeline
57
+
58
+ summarizer = pipeline('summarization', model=model, tokenizer=tokenizer)
59
+
60
+ long_review = "I have been using this app for a while and it has significantly improved my productivity.
61
+ The range of features is excellent, and the user interface is intuitive. However, there are occasional
62
+ bugs that need fixing."
63
+ summary = summarizer(long_review, max_length=50, min_length=25, do_sample=False)
64
+
65
+ print(summary)
66
+ # Output: [{'summary_text': 'The app has significantly improved my productivity with its excellent features and intuitive user interface. However, occasional bugs need fixing.'}]
67
+ ```