BERT-E2E-ABSA icon indicating copy to clipboard operation
BERT-E2E-ABSA copied to clipboard

How to test the statement view

Open yifanhunter opened this issue 5 years ago • 8 comments

How to test the statement view, for example, I input "this movie is very good", and feedback positive

yifanhunter avatar Jun 05 '20 11:06 yifanhunter

Excuse me again,what are the requirements for the tested data? I find that your data has been marked. Test data is also labeled.

yifanhunter avatar Jun 05 '20 14:06 yifanhunter

For your first issue, this project may not support the detection of the overall sentiment (or "view") of the input sentence.

For your second issue, the labels for testing data is not used under the evaluation/inference mode. You can set some dummy labels (e.g., randomly sample the labels from the valid tag set) for the input data.

lixin4ever avatar Jun 06 '20 04:06 lixin4ever

Thank you for your reply, and ask another question: Does your model do not support downstream tasks? That is, I give a standard text, and the corresponding emotional output cannot be achieved through the model. If it is not supported now, how to adjust the support in the future? Looking forward to your reply, thank you!

yifanhunter avatar Jun 07 '20 05:06 yifanhunter

Thank you for your reply, and ask another question: Does your model do not support downstream tasks? That is, I give a standard text, and the corresponding emotional output cannot be achieved through the model. If it is not supported now, how to adjust the support in the future? Looking forward to your reply, thank you!

yifanhunter avatar Jun 07 '20 05:06 yifanhunter

You mean give the input sentence and output the extracted aspect terms as well as the corresponding sentiments/emotions?

lixin4ever avatar Jun 08 '20 03:06 lixin4ever

Yes, give the system an unlabeled text, and get the aspects and emotions directly through the system.

yifanhunter avatar Jun 08 '20 06:06 yifanhunter

The current strategy in work.py is to read the input from the file (batch-based input). For adapting the code to the streaming input, you need to write a function to build the valid input, namely, "input_ids", "attention_mask" and "token_type_ids" (note that "labels" is not necessary and you can set this argument as None). If you have no idea on how to do the tokenization, please refer to the function convert_examples_to_seq_features.

Besides, you also need to add some post-processing function to convert the model output into the desired format.

lixin4ever avatar Jun 08 '20 06:06 lixin4ever

Excuse me, has this problem been solved yet

jiutongl avatar Jun 22 '22 02:06 jiutongl