yangheng95 / PyABSA

Sentiment Analysis, Text Classification, Text Augmentation, Text Adversarial defense, etc.;
https://pyabsa.readthedocs.io
MIT License
956 stars 162 forks source link

Some minor issues about the doc #253

Closed combokang closed 1 year ago

combokang commented 1 year ago
  1. The file name of /examples-v2/aspect_polarity_classification/Aspect_Sentiment_Cassification.ipynb is incorrect (missing an "l" in the word "classification"), which at least lead to a dead hyperlink in /readme/tutorial_readme.md.

  2. Block 8 of /examples-v2/aspect_polarity_classification/Aspect_Sentiment_Cassification.ipynb (Simple Prediction):

    examples = [
    "everything is always cooked to perfection , the [B-ASP]service[E-ASP] is excellent , the [B-ASP]decor[E-ASP] cool and understated . $LABEL$ Positive, Positive",
    "Great [B-ASP]taste[E-ASP] ever tried."
    "I think this laptop is great!",  # if you dont label an aspect, then pyabsa try to give you a 'global sentiment'. But please avoid doing that.
    ]

    Missing a comma between "Great [B-ASP]taste[E-ASP] ever tried." and "I think this laptop is great!".

yangheng95 commented 1 year ago

Hi @combokang Thank you for your report, That's very helpful!

combokang commented 1 year ago

The output of Simple Prediction does not match the input after revised. Should have 3 examples.

Example 0: everything is always cooked to perfection , the <service:Positive(confidence:0.999, ref:Positive)> is excellent , the <decor:Positive(confidence:0.999, ref:Positive)> cool and understated .
Warning: aspect number 1 not equal to reference sentiment number 0, text: Great [B-ASP]taste[E-ASP] ever tried.I think this laptop is great!
Example 0: Great <taste:Positive(confidence:0.999, ref:-100)> ever tried.I think this laptop is great!
yangheng95 commented 1 year ago

I can see 3 output in my environment, are you sure about your input cases? Can you paste them here?

yangheng95 commented 1 year ago
image