Update README.md
Browse files
README.md
CHANGED
@@ -16,7 +16,7 @@ the custom code and model architecture has been included with the model.
|
|
16 |
|
17 |
## Example Code for inferencing
|
18 |
|
19 |
-
### STEP 1 (Installing huggingface
|
20 |
|
21 |
```bash
|
22 |
pip install --upgrade huggingface_hub
|
@@ -62,7 +62,26 @@ Expected output
|
|
62 |
['battery life', 'great', 'positive']]
|
63 |
```
|
64 |
|
65 |
-
#
|
66 |
The model has been trained to use Grid Tagging Scheme (GTS) to predict `Opinion Target`, `Opinion Span` and `Sentiment Polarity`. The grid tagging example is shown
|
67 |
in the following diagram:
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
## Example Code for inferencing
|
18 |
|
19 |
+
### STEP 1 (Installing huggingface lib)
|
20 |
|
21 |
```bash
|
22 |
pip install --upgrade huggingface_hub
|
|
|
62 |
['battery life', 'great', 'positive']]
|
63 |
```
|
64 |
|
65 |
+
# DETAILS
|
66 |
The model has been trained to use Grid Tagging Scheme (GTS) to predict `Opinion Target`, `Opinion Span` and `Sentiment Polarity`. The grid tagging example is shown
|
67 |
in the following diagram:
|
68 |
+
|
69 |
+
<figure>
|
70 |
+
<img src="./gts_pic.png" alt="gts-image" style="width:45%">
|
71 |
+
<figcaption>Fig 1. Grid tagging Scheme from <a href="https://aclanthology.org/2020.findings-emnlp.234/">(Wu et al., Findings 2020)</a> </figcaption>
|
72 |
+
</figure>
|
73 |
+
|
74 |
+
In the above sentence there are two absa triples. Each triple is expressed in the following order:
|
75 |
+
|
76 |
+
[<span style="color:red">Aspect Term/Opinion Target</span>, <span style="color:#7393B3">opinion span</span>, <span style="color:purple">sentiment polarity</span>]
|
77 |
+
|
78 |
+
The model and sample code as shown in the snippet with extract opinion triplets as: [
|
79 |
+
[<span style="color:red">hot dogs</span>, <span style="color:#7393B3">top notch</span>, <span style="color:purple">positive</span>],
|
80 |
+
[<span style="color:red">coffee</span>, <span style="color:#7393B3">avergae</span>, <span style="color:purple">neutral</span>]
|
81 |
+
]
|
82 |
+
|
83 |
+
Definitions <a href="https://aclanthology.org/2020.findings-emnlp.234/">(Wu et al., Findings 2020)</a>:
|
84 |
+
|
85 |
+
1. <span style="color:red">Aspect Term/Opinion Target</span>: Aspect term, also known as opinion target, is the word or phrase in a sentence representing feature or entity of products or services.
|
86 |
+
2. <span style="color:#7393B3">Opinion Term </span>: Opinion Term refers to the term in a sentence used to express attitudes or opinions explicitly.
|
87 |
+
3. <span style="color:purple">Sentiment Polarity</span>: This is the sentiment expressed.
|