You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently performing a sentiment analysis using PyABSA, using the following code:
'''
You can check this library: https://github.com/yangheng95/PyABSA
I am using the latest version 2.0
'''
from pyabsa import ABSAInstruction, available_checkpoints
myreviews = ['I really enjoyed the place, e.g. the service and food were great','Nice and clean place, would go again.', 'I love the chef, he makes the best pasta']
checkpoint_map = available_checkpoints()
quadruple_extractor = ABSAInstruction.ABSAGenerator("multilingual")
quadruple_result = quadruple_extractor.predict(review, max_length=128)
However, my result does currently look like this: {'text': 'I really enjoyed the place, e.g. the service and food were great', 'Quadruples': [{'aspect': 'service', 'polarity': 'positive', 'opinion': 'enjoyed', 'category': 'SERVICE#GENERAL'}, {'aspect': 'food', 'polarity': 'positive', 'opinion': 'great', 'category': 'FOOD#QUALITY'}]}
My problem is that I need the sentiment (polarity) as a figure, but I can't find any description in the documentation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently performing a sentiment analysis using PyABSA, using the following code:
However, my result does currently look like this:
{'text': 'I really enjoyed the place, e.g. the service and food were great', 'Quadruples': [{'aspect': 'service', 'polarity': 'positive', 'opinion': 'enjoyed', 'category': 'SERVICE#GENERAL'}, {'aspect': 'food', 'polarity': 'positive', 'opinion': 'great', 'category': 'FOOD#QUALITY'}]}
My problem is that I need the sentiment (polarity) as a figure, but I can't find any description in the documentation.
Beta Was this translation helpful? Give feedback.
All reactions