gauneg commited on
Commit
56c48d2
1 Parent(s): d080b97

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -28
README.md CHANGED
@@ -20,6 +20,37 @@ This model has been trained on the following datasets:
20
  2. Multi-Aspect Multi-Sentiment [MAMS](https://aclanthology.org/D19-1654/)
21
 
22
  # Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
  * Making token level inferences with Auto classes
25
 
@@ -82,35 +113,7 @@ Expected output
82
  ('.', 'O')]
83
  ```
84
 
85
- * Making end-to-end inference with a pipeline
86
-
87
- ```python
88
-
89
- from transformers import pipeline
90
 
91
- ate_sent_pipeline = pipeline(task='ner',
92
- aggregation_strategy='simple',
93
- model="gauneg/deberta-v3-base-absa-ate-sentiment")
94
-
95
- text_input = "Been here a few times and food has always been good but service really suffers when it gets crowded."
96
- ate_sent_pipeline(text_input)
97
-
98
- ```
99
- Expected output
100
-
101
- ```bash
102
- [{'entity_group': 'pos', #sentiment polarity
103
- 'score': 0.87505656,
104
- 'word': 'food', # aspect term
105
- 'start': 25,
106
- 'end': 30},
107
- {'entity_group': 'neg',# sentiment polarity
108
- 'score': 0.4558051,
109
- 'word': 'service', #aspect term
110
- 'start': 55,
111
- 'end': 63}]
112
-
113
- ```
114
 
115
 
116
  # Evaluation on Benchmark Test Datasets
 
20
  2. Multi-Aspect Multi-Sentiment [MAMS](https://aclanthology.org/D19-1654/)
21
 
22
  # Use
23
+ * Making end-to-end inference with a pipeline
24
+
25
+ ```python
26
+
27
+ from transformers import pipeline
28
+
29
+ ate_sent_pipeline = pipeline(task='ner',
30
+ aggregation_strategy='simple',
31
+ model="gauneg/deberta-v3-base-absa-ate-sentiment")
32
+
33
+ text_input = "Been here a few times and food has always been good but service really suffers when it gets crowded."
34
+ ate_sent_pipeline(text_input)
35
+
36
+ ```
37
+ Expected output
38
+
39
+ ```bash
40
+ [{'entity_group': 'pos', #sentiment polarity
41
+ 'score': 0.87505656,
42
+ 'word': 'food', # aspect term
43
+ 'start': 25,
44
+ 'end': 30},
45
+ {'entity_group': 'neg',# sentiment polarity
46
+ 'score': 0.4558051,
47
+ 'word': 'service', #aspect term
48
+ 'start': 55,
49
+ 'end': 63}]
50
+
51
+ ```
52
+
53
+ # OR
54
 
55
  * Making token level inferences with Auto classes
56
 
 
113
  ('.', 'O')]
114
  ```
115
 
 
 
 
 
 
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
 
119
  # Evaluation on Benchmark Test Datasets