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
from pyabsa import AspectTermExtraction as ATEPC
atepc_examples = " * * * HITS BLUNT * * * What a great time I had discovering a live band and tasty food in this place . Went for momo ’ s , ended with not only momo ’ s but a great variety that was delightful . Great friendly service was appreciated . The Himalayan black salt drink ( maybe needs a little side note to let people what to expect ) . Will be back !"
aspect_extractor = ATEPC.AspectExtractor(
checkpoint="fast_lcf_atepc_custom_dataset_fusion_apcacc_90.15_apcf1_79.29_atef1_82.32",
auto_device=True,
cal_perplexity=True,
)
aspect_extractor.predict(
text=atepc_examples,
#save_result=True,
save_result=False,
print_result=True,
pred_sentiment=True,
)
Full Console Output (Required)
Example 0: * * * HITS BLUNT * * * What a <great:Positive Confidence:0.9958400726318359> time I had discovering a <live:Positive Confidence:0.9953206181526184> band and <tasty:Positive Confidence:0.9955742359161377> food in this place . Went <for:Positive Confidence:0.9764904975891113> momo ’ s , ended with not only momo ’ s but a great variety that was delightful . Great <friendly:Positive Confidence:0.950766921043396> service was appreciated . The Himalayan black <salt:Negative Confidence:0.6763073801994324> drink ( maybe needs a little side note to let people what to expect ) . Will be back !
Describe the bug
The program extracted 6 aspects but seems wrong, looks like it should more likely return the tokens on the right of the current results. Seems a bug.
Current results: great, live, tasty, for, friendly, salt.
Expected behavior
Expected results: time, band, food, momo, service, drink.
The text was updated successfully, but these errors were encountered:
It seems the position shifts and causes this problem. However, I have had a tight schedule recently, so before I fix this issue, please try to do it yourself and PR.
Please provide the REQUIRED information. Otherwise, It is almost impossible to locate the problem. DO NOT CHANGE THE FORM.
PyABSA Version (Required)
Code To Reproduce (Required)
Full Console Output (Required)
Describe the bug
Expected behavior
The text was updated successfully, but these errors were encountered: