Closed ghost closed 1 year ago
These tags are just for human reference and invisble for models. You can input like "The cake tastes great."
That's clear, thank you!
But there is no possibility to give a text and a list of entities as arguments, to get their polarity and opinion extracted?
Input: 'The cake tastes great.'
, ['cake']
Output {'Aspect': 'cake', 'Opinion': 'great', 'Polarity': 'Positive'}
I'm aware, but this only returns the polarity without the opinion/sentiment driver.
{'text': 'The food was good, but the service was terrible.',
'aspect': ['food', 'service'],
'sentiment': ['Positive', 'Negative'],
'confidence': [0.9846736192703247, 0.974354088306427],
'probs': [array([0.01351087, 0.00181547, 0.9846736 ], dtype=float32),
array([0.9743541 , 0.00281978, 0.02282613], dtype=float32)],
'ref_sentiment': ['-100', '-100'],
'ref_check': ['', ''],
'perplexity': 'N.A.'},
{'text': 'The food was terrible, but the service was good.',
'aspect': ['food', 'service'],
'sentiment': ['Negative', 'Positive'],
'confidence': [0.9592238068580627, 0.9870247840881348],
'probs': [array([0.9592238 , 0.00441253, 0.03636366], dtype=float32),
array([0.01152945, 0.00144578, 0.9870248 ], dtype=float32)],
'ref_sentiment': ['-100', '-100'],
'ref_check': ['', ''],
'perplexity': 'N.A.'},
{'text': 'The food was so-so, and the service was terrible.',
'aspect': ['food', 'service'],
'sentiment': ['Neutral', 'Negative'],
'confidence': [0.7357237339019775, 0.9721798300743103],
'probs': [array([0.19523466, 0.73572373, 0.06904164], dtype=float32),
array([0.97217983, 0.00251 , 0.02531017], dtype=float32)],
'ref_sentiment': ['-100', '-100'],
'ref_check': ['', ''],
'perplexity': 'N.A.'}
]
Is there a way predict
also returns the opinion/sentiment drivers ("so-so", "terrible", "good")?
Then there is no other choices in this repo
Thanks, Heng! 🙏🏻
I want to have the sentiment driver and the polarity for an entity extracted. I'm aware you can do Aspect Sentiment Triplet Extraction, but you need to know the sentiment driver and the polarity beforehand, right? To add it as an argument:
Is there a way to use ASTE by only giving it the entity and have the sentiment and polarity extracted automatically, like this?
Or can you get the sentiment driver extracted with APC somehow?
PS: I accidentally labelled this issue as a bug. It's not a bug :)