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
textList = []
import csv
with open("C:\Users\userName\Desktop\Row64Stuff\Data\Data.csv") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
textList.append(row)
results = []
for text in textList:
result = triplet_extractor.predict(text)
if result != []:
results.append(result[-1])
else:
pass
Full Console Output (Required)
Example of one output:
'sentence': 'The ranked system of this game is actually such a freaking abysmal joke, from the mmr system, lack of transparency, trolls, duoq abusers, destructive lp gains, and matchmaking algorithm.',
'Triplets': [
{'Aspect': 'ranked system', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'ranked system', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'ranked system', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'destructive', 'Polarity': 'Negative'}
Describe the bug
When the model predicts the outputs for each sentence I feed into the model - it produces each detected aspect with every opinion and polarity detected even if those opinions and polarities are not relevant to the specific aspect.
Expected behavior
I was hoping for each opinion and polarity to be attached to the relevant aspect as opposed to every aspect detected by the model.
The text was updated successfully, but these errors were encountered:
Probably this is a performance problem of the original model which I adapt from (according to the license). So, maybe you can contact the author to solve this problem. I will be happy to keep this model up-to-date with https://github.com/CCChenhao997/EMCGCN-ASTE
PyABSA Version (Required)
PyABSA 2.3.1
Torch 2.0.1+cu117
Transformers 4.30.2
Code To Reproduce (Required)
from pyabsa import AspectSentimentTripletExtraction as ASTE
triplet_extractor = ASTE.AspectSentimentTripletExtractor("multilingual")
triplet_extractor = ASTE.AspectSentimentTripletExtractor("multilingual")
textList = []
import csv
with open("C:\Users\userName\Desktop\Row64Stuff\Data\Data.csv") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
textList.append(row)
results = []
for text in textList:
result = triplet_extractor.predict(text)
if result != []:
results.append(result[-1])
else:
pass
Full Console Output (Required)
Example of one output:
'sentence': 'The ranked system of this game is actually such a freaking abysmal joke, from the mmr system, lack of transparency, trolls, duoq abusers, destructive lp gains, and matchmaking algorithm.',
'Triplets': [
{'Aspect': 'ranked system', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'ranked system', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'ranked system', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'mmr system,', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'lp gains,', 'Opinion': 'destructive', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'abysmal joke,', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'lack of transparency,', 'Polarity': 'Negative'},
{'Aspect': 'matchmaking algorithm.', 'Opinion': 'destructive', 'Polarity': 'Negative'}
Describe the bug
When the model predicts the outputs for each sentence I feed into the model - it produces each detected aspect with every opinion and polarity detected even if those opinions and polarities are not relevant to the specific aspect.
Expected behavior
I was hoping for each opinion and polarity to be attached to the relevant aspect as opposed to every aspect detected by the model.
The text was updated successfully, but these errors were encountered: