yangheng95 / PyABSA

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

[Questions] #187

Closed atharvjairath closed 2 years ago

atharvjairath commented 2 years ago

Hey : Thanks to your previous help, I was able to make it work. Now I have a few questions for better understanding:

  1. Does the Train and Test data need to be preprocessed? like stemming and removing punctuations etc? or there is some internal preprocessing happening in the code?
  2. I wanted to understand the architecture and the meaning of these models: Fast-LSA-T, Fast-LSA-S, etc. Please feel free to point me to the correct resources for them to understand. What changes do you make to make them fast and what is the difference between LSA-T and LSA-S?
  3. Is there any preference to use DeBERTa or we can use BERT and any other transformer too?

Thanks in Advance.

yangheng95 commented 2 years ago

Hi! here are your answers:

  1. you don't need to preprocess the text, but PyABSA may do some preprocessing before extracting aspects at there
  2. We develop fast version by moving the LCF vec calculation to preprocess step instead training. For LSA, we reuse the hidden state to build the sentiment window for side aspects. The draft version of the paper introducing LSA can be found at here
  3. We provide the general model for you, but you can try every model on HuggingFace Hub by set config.pretrained_bert='huggingface hub model'
atharvjairath commented 2 years ago

@yangheng95 Thanks for a detailed answer. :100:

atharvjairath commented 2 years ago

Hey, I had a few more questions:

  1. Using FAST_LSA_T, I got 99% accuracy on test data only by training for 10 epochs, while FAST_LSA_S failed to get above 50%, what could be the reason for that, I used the same config for both the models from here.
  2. While testing my model through batch infer, I realized that the code was not able to process the data which had repeating aspects. Does the model not capable of handling repeating aspects? One fix I know is while processing the data we can create two separate data, wherein one we have 1st aspect and in 2nd we have at another position. But still it won't work at evaluation/Infer time. Please feel free to add your opinions about this
    [ASP]app[ASP] is very very very slow 2.[ASP]app[ASP] taking very very long time to open 3. !sent! Negative
    -> Unequal length of reference sentiment and aspects, ignore the reference sentiment.
  3. Is there any way I can plot train and test loss over time? I could although add it myself too.

Thanks in Advance.

yangheng95 commented 2 years ago
  1. You should train multiple times, because small dataset sometimes got trapped in low accuracy
  2. This problem is has not been solved yet, could be solved in the future
  3. [ASP]app[ASP] is very very very slow 2.[ASP]app[ASP] taking very very long time to open 3. !sent! Negative The number of ref sentiment should match the number of target aspect wrapped by [ASP]
  4. No dynamic visualization of loss is available, but you can save the loss in each loss and plot it after training,