Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem report: extracted bad aspect results #353

Open
combokang opened this issue Sep 25, 2023 · 4 comments
Open

Problem report: extracted bad aspect results #353

combokang opened this issue Sep 25, 2023 · 4 comments

Comments

@combokang
Copy link

Please provide the REQUIRED information. Otherwise, It is almost impossible to locate the problem. DO NOT CHANGE THE FORM.

PyABSA Version (Required)

Python Version: 3.10.6
PyABSA Version: 2.0.27
Torch Version: 1.13.1
Transformers Version: 4.26.0

Code To Reproduce (Required)

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.
@yangheng95
Copy link
Owner

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.

@combokang
Copy link
Author

I don't think I have the ability to fix this problem, so anyone who can fix this problem is a big thanks.

@yangheng95
Copy link
Owner

Is this an instance-level or dataset-level error? @combokang

@combokang
Copy link
Author

Instance-level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants