Update README.md
Browse files
README.md
CHANGED
@@ -19,6 +19,13 @@ This modelization is close to [tblard/tf-allocine](https://huggingface.co/tblard
|
|
19 |
|
20 |
Dataset
|
21 |
-------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
Evaluation results
|
24 |
------------------
|
@@ -26,5 +33,30 @@ Evaluation results
|
|
26 |
Benchmark
|
27 |
---------
|
28 |
|
|
|
|
|
29 |
How to use DistilCamemBERT-Sentiment
|
30 |
------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
Dataset
|
21 |
-------
|
22 |
+
|
23 |
+
The dataset is composed of XXX,XXX reviews for training and X,XXX review for the test issue of Amazon, and respectively XXX,XXX and X,XXX critics issue of Allocine website. The dataset is labeled into 5 categories:
|
24 |
+
* 1 star: represent very bad appreciation,
|
25 |
+
* 2 stars: bad appreciation,
|
26 |
+
* 3 stars: neutral appreciation,
|
27 |
+
* 4 stars: good appreciation,
|
28 |
+
* 5 stars: very good appreciation.
|
29 |
|
30 |
Evaluation results
|
31 |
------------------
|
|
|
33 |
Benchmark
|
34 |
---------
|
35 |
|
36 |
+
This model is compared to 3 reference models (see below). As each model does not have the same definition of targets, we detail the performance measure used for each of them. For the mean inference time measure, an AMD Ryzen 5 4500U @ 2.3GHz with 6 cores was used:
|
37 |
+
|
38 |
How to use DistilCamemBERT-Sentiment
|
39 |
------------------------------------
|
40 |
+
|
41 |
+
```python
|
42 |
+
from transformers import pipeline
|
43 |
+
|
44 |
+
analyzer = pipeline(
|
45 |
+
task='text-classification',
|
46 |
+
model="cmarkea/distilcamembert-base-sentiment",
|
47 |
+
tokenizer="cmarkea/distilcamembert-base-sentiment"
|
48 |
+
)
|
49 |
+
result = analyzer("J'aime marché dans la nature même si ça me donne mal au pied.")
|
50 |
+
|
51 |
+
result
|
52 |
+
[{'label': '1 star',
|
53 |
+
'score': 0.07675889134407043},
|
54 |
+
{'label': '2 stars',
|
55 |
+
'score': 0.19822990894317627},
|
56 |
+
{'label': '3 stars',
|
57 |
+
'score': 0.38655608892440796},
|
58 |
+
{'label': '4 stars',
|
59 |
+
'score': 0.24029818177223206},
|
60 |
+
{'label': '5 stars',
|
61 |
+
'score': 0.09815695881843567}]
|
62 |
+
```
|