erikve commited on
Commit
671b9d8
1 Parent(s): 7f0086f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -20
README.md CHANGED
@@ -9,28 +9,11 @@ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- This space provides a gradio demo and an easy-to-run wrapper of the pre-trained model for structured sentiment analysis in Norwegian language, pre-trained on the [NoReC dataset](https://huggingface.co/datasets/norec).
13
- This space containt an implementation of method described in "Direct parsing to sentiment graphs" (Samuel _et al._, ACL 2022). The main repository that also contains the scripts for training the model, can be found on the project [github](https://github.com/jerbarnes/direct_parsing_to_sent_graph).
14
 
15
- The proposed method suggests three different ways to encode the sentiment graph: "node-centric", "labeled-edge", and "opinion-tuple". The current model uses the "labeled-edge" graph encoding, and achieves the following results on the held-out set of the NoReC dataset:
16
 
17
- | Unlabeled sentiment tuple F1 | Target F1 | Relative polarity precision |
18
- |:----------------------------:|:----------:|:---------------------------:|
19
- | 0.434 | 0.541 | 0.926 |
20
-
21
-
22
- In "Word Substitution with Masked Language Models as Data Augmentation for Sentiment Analysis", we analyzed data augmentation strategies for improving performance of the model. Using masked-language modeling (MLM), we augmented the sentences with MLM-substituted words inside, outside, or inside+outside the actual sentiment tuples. The results below show that augmentation may be improve the model performance. This space, however, runs the original model trained without augmentation.
23
-
24
- | | Augmentation rate | Unlabeled sentiment tuple F1 | Target F1 | Relative polarity precision |
25
- |----------------|-------------------|------------------------------|-----------|-----------------------------|
26
- | Baseline | 0% | 43.39 | 54.13 | 92.59 |
27
- | Outside | 59% | **45.08** | 56.18 | 92.95 |
28
- | Inside | 9% | 43.38 | 55.62 | 92.49 |
29
- | Inside+Outside | 27% | 44.12 | **56.44** | **93.19** |
30
-
31
-
32
-
33
- The model can be easily used for predicting sentiment tuples as follows:
34
 
35
  ```python
36
  >>> import model_wrapper
@@ -43,3 +26,5 @@ The model can be easily used for predicting sentiment tuples as follows:
43
  'Polar_expression': [['liker'], ['3:8']],
44
  'Polarity': 'Positive'}]}]
45
  ```
 
 
 
9
  pinned: false
10
  ---
11
 
12
+ This space provides a gradio demo of a [pretrained model](https://huggingface.co/ltg/ssa-perin) (with an easy-to-run wrapper) for structured sentiment analysis (SSA) of Norwegian text, trained on the [NoReC_fine](https://github.com/ltgoslo/norec_fine) dataset. It implements a method described in the paper [Direct parsing to sentiment graphs](https://aclanthology.org/2022.acl-short.51/) by Samuel et al. 2022.
 
13
 
14
+ The model will attempt to identify the following components for a given sentence it deems to be sentiment-bearing: _source expressions_ (the opinion holder), _target expressions_ (what the opinion is directed towards), _polar expressions_ (the part of the text indicating that an opinion is expressed), and finally the _polarity_ (positive or negative).
15
 
16
+ See the code below for an example of how you can use the model yourself for predicting such sentiment tuples (along with character offsets in the text):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  ```python
19
  >>> import model_wrapper
 
26
  'Polar_expression': [['liker'], ['3:8']],
27
  'Polarity': 'Positive'}]}]
28
  ```
29
+
30
+ To download the model and find more in-depth documentation, please see (https://huggingface.co/ltg/ssa-perin)[https://huggingface.co/ltg/ssa-perin]