dominguesm commited on
Commit
52989b8
1 Parent(s): d6e6d43

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -14
README.md CHANGED
@@ -3,20 +3,19 @@ language: pt
3
  tags:
4
  - seq2seq
5
  - t5
6
- - positive_perspectives
7
  widget:
8
- - text: "['agradecimento', 'otimismo']: Tenho tanta coisa para fazer antes de sair da cidade por uma semana no domingo."
9
- - text: "['auto_afirmacao']: Aquele momento, você percebe que todo o trabalho duro foi para nada e você não tem controle sobre nada."
10
- - text: "['impermanencia']: Um daqueles dias em que você sente que precisa de um abraço de cinco minutos, um pacote de marshmallows e um amigo para conversar."
11
- - text: "['neutralizando', 'otimismo']: Pensar no meu futuro me faz querer viver numa ilha sozinha para sempre."
12
- - text: "['crescimento', 'otimismo']: A lista de coisas que tenho que fazer hoje é para sempre longa. Posso simplesmente voltar para a cama e acordar amanhã com tudo feito?"
13
  ---
14
 
15
  # Positive Perspectives with Portuguese Text Reframing
16
 
17
  ## Model description
18
 
19
- This model is a [PTT5](https://huggingface.co/unicamp-dl/ptt5-base-portuguese-vocab) adjusted to the sentiment transfer task, where the objective is to reverse the sentiment polarity of a text without contradicting the original meaning. Positive reframing induces a complementary positive viewpoint (e.g. glass-half-full) escaping negative patterns. Based on the article [arXiv:2204.02952](https://arxiv.org/abs/2204.02952).
20
 
21
  ## How to use
22
 
@@ -28,17 +27,17 @@ The model uses one or more sentiment strategies concatenated with a sentence and
28
 
29
  ### Available sentiment strategies:
30
 
31
- **crescimento**: viewing a challenging event as an opportunity for the author to specifically grow or improve himself.
32
 
33
- **impermanencia**: Saying that bad things don't last forever, will get better soon, and/or that other people have had similar difficulties.
34
 
35
- **neutralizando**: Replacing a negative word with a neutral word. For example, “This was a terrible day” becomes “This was a long day”.
36
 
37
- **otimismo**: Focusing on things about the situation itself, at that moment, that are good (not just predicting a better future).
38
 
39
- **auto_afirmacao**: Talking about what strengths the author already has, or values he admires, such as love, courage, perseverance, etc.
40
 
41
- **agradecimento**: Expressing gratitude or gratitude with keywords like appreciate, happy for it, grateful for, good thing, etc.
42
 
43
  ### Usage
44
 
@@ -47,7 +46,7 @@ from transformers import pipeline
47
 
48
  pipe = pipeline('summarization', "dominguesm/positive-reframing-ptbr")
49
 
50
- text = "['agradecimento', 'otimismo']: Tenho tanta coisa para fazer antes de sair da cidade por uma semana no domingo."
51
 
52
  pipe(text, max_length=1024)
53
 
 
3
  tags:
4
  - seq2seq
5
  - t5
 
6
  widget:
7
+ - text: "['growth', 'neutralizing']: Sempre estressado e pensando em um monte de coisas ao mesmo tempo, preciso levar uma de cada vez, sobrecarga estressada, necessidade de reclamar"
8
+ - text: "['growth', 'neutralizing', 'optimism']: Se eu não tiver um colapso mental antes do final do verão, será um milagre."
9
+ - text: "['impermanence']: Dirigindo para visitar a vovó no hospital e o meu filho que está doente."
10
+ - text: "['optimism']: Ótimo agora, como vou explicar isso para ela, ela está tão perto de mim que não posso perdê-la :'("
11
+ - text: "['growth', 'optimism']: sempre algo que eu poderia estar fazendo. Eu geralmente escolho não fazer isso."
12
  ---
13
 
14
  # Positive Perspectives with Portuguese Text Reframing
15
 
16
  ## Model description
17
 
18
+ This model is a [PTT5][https://huggingface.co/unicamp-dl/ptt5-base-portuguese-vocab] finetuned to sentiment transfer task, where the objective is to reverse the sentiment polarity of a text without contradicting the original meaning. Based on the paper [arXiv:2204.02952](https://arxiv.org/abs/2204.02952).
19
 
20
  ## How to use
21
 
 
27
 
28
  ### Available sentiment strategies:
29
 
30
+ **growth**: viewing a challenging event as an opportunity for the author to specifically grow or improve himself.
31
 
32
+ **impermanence**: Saying that bad things don't last forever, will get better soon, and/or that other people have had similar difficulties.
33
 
34
+ **neutralizing**: Replacing a negative word with a neutral word. For example, “This was a terrible day” becomes “This was a long day”.
35
 
36
+ **optimism**: Focusing on things about the situation itself, at that moment, that are good (not just predicting a better future).
37
 
38
+ **self_affirmation**: Talking about what strengths the author already has, or values he admires, such as love, courage, perseverance, etc.
39
 
40
+ **thankfulness**: Expressing gratitude or gratitude with keywords like appreciate, happy for it, grateful for, good thing, etc.
41
 
42
  ### Usage
43
 
 
46
 
47
  pipe = pipeline('summarization', "dominguesm/positive-reframing-ptbr")
48
 
49
+ text = "['thankfulness', 'optimism']: Tenho tanta coisa para fazer antes de sair da cidade por uma semana no domingo."
50
 
51
  pipe(text, max_length=1024)
52