yangheng95 / PyABSA

Sentiment Analysis, Text Classification, Text Augmentation, Text Adversarial defense, etc.;
https://pyabsa.readthedocs.io
MIT License
909 stars 153 forks source link

polarity dimension problem #107

Closed WeiLi9811 closed 2 years ago

WeiLi9811 commented 2 years ago

@yangheng95 Hi, Yangheng! Your package really helps and now i could generate aspect as well as their sentiment using my own data(i would be more than glad to share my data after finishing my project)!

Just one curiosity regarding this repository: currently i could only generate sentiment in 3-scale dimension: positive, neutral, negative. But I actually need to generate 5-scale dimentions: 1-very negative 2-negative 3-neutral 4-positive 5-very positive

It is possible for me to do that? Thanks in advance for your kind reply^^

yangheng95 commented 2 years ago

The package allows you to use more than three labels, please find the description in the Tips. You can just label your sentence using very negative, negative, neutral, positive, very positive. You dont need to assign the number for labels, PyABSA will do it for you

yangheng95 commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

WeiLi9811 commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

lpfy commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

I can add options to DPT in next version. the only concern is from language point of view, probably negative and very negative are not so different. Probably I will add 5-scale as Positive, Somewhat Positive, Neutral, Somewhat Negative, Negative.

WeiLi9811 commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

I can add options to DPT in next version. the only concern is from language point of view, probably negative and very negative are not so different. Probably I will add 5-scale as Positive, Somewhat Positive, Neutral, Somewhat Negative, Negative.

I will be very thankful if you could kindly add 5-scale! The problem for me is that, I'm working on a restaurant review project. When people give comments, they tend to use "satisfying" "extremely good" "just okay" "taste bad" "awful, hell" to express their feelings. So in personal my project may need at least 5-scale.

Also, thanks so much for your excellent work! I benefit from your DPT a lot!

lpfy commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

I can add options to DPT in next version. the only concern is from language point of view, probably negative and very negative are not so different. Probably I will add 5-scale as Positive, Somewhat Positive, Neutral, Somewhat Negative, Negative.

I will be very thankful if you could kindly add 5-scale! The problem for me is that, I'm working on a restaurant review project. When people give comments, they tend to use "satisfying" "extremely good" "just okay" "taste bad" "awful, hell" to express their feelings. So in personal my project may need at least 5-scale.

Also, thanks so much for your excellent work! I benefit from your DPT a lot!

No worries, I now understand the requirement, so I will make the scale more flexible, will add multi-choice at beginning step to allow user defining scales, 3, 5, 7. hopefully can be finished over weekend

yangheng95 commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

I can add options to DPT in next version. the only concern is from language point of view, probably negative and very negative are not so different. Probably I will add 5-scale as Positive, Somewhat Positive, Neutral, Somewhat Negative, Negative.

I will be very thankful if you could kindly add 5-scale! The problem for me is that, I'm working on a restaurant review project. When people give comments, they tend to use "satisfying" "extremely good" "just okay" "taste bad" "awful, hell" to express their feelings. So in personal my project may need at least 5-scale. Also, thanks so much for your excellent work! I benefit from your DPT a lot!

No worries, I now understand the requirement, so I will make the scale more flexible, will add multi-choice at beginning step to allow user defining scales, 3, 5, 7. hopefully can be finished over weekend

Just wonder Is it possible to add label customizing feature before using DPT?

lpfy commented 2 years ago

That is, what labels you use in your dataset, what labels will be output in inference. The index assignment of labels is handled automaticly.

Got it! Thanks a lot for your detailed explanation. One more question: I am now using the new function DPT (develped by @lpfy ) to label my sentences, and it has only 3 dimensions. If i want to change my sentiment to 5-sacle, I won't be able to use DPT and have to manualy label my sentences, right?

I can add options to DPT in next version. the only concern is from language point of view, probably negative and very negative are not so different. Probably I will add 5-scale as Positive, Somewhat Positive, Neutral, Somewhat Negative, Negative.

I will be very thankful if you could kindly add 5-scale! The problem for me is that, I'm working on a restaurant review project. When people give comments, they tend to use "satisfying" "extremely good" "just okay" "taste bad" "awful, hell" to express their feelings. So in personal my project may need at least 5-scale. Also, thanks so much for your excellent work! I benefit from your DPT a lot!

No worries, I now understand the requirement, so I will make the scale more flexible, will add multi-choice at beginning step to allow user defining scales, 3, 5, 7. hopefully can be finished over weekend

Just wonder Is it possible to add label customizing feature before using DPT?

Yep, it is doable. I can add a wizard form for setting up labels before load data. Asking people whether using pre-defined labels or customized labels. need more time to code, but my plan is add pre-defined 3,5,7 labels first, then enable "customized labels" functionality next

yangheng95 commented 2 years ago

That is a huge job, thanks very much