songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
MIT License
1.99k stars 522 forks source link

LCF BERT inputs #195

Open dimtsintzou opened 3 years ago

dimtsintzou commented 3 years ago

Hi could you please verify which are the inputs for the calculation of lcf_vec? In your code you use the text_bert_indices lca_ids, lcf_cdm_vec = get_lca_ids_and_cdm_vec(opt, text_bert_indices, aspect_bert_indices, aspect_begin, syntactical_dist) where text_bert_indices=[CLS] + sentence+[SEP]+aspect +[SEP]

However in https://github.com/yangheng95/LCF-ATEPC he uses text_bert_indices=[CLS] + sentence+[SEP]

Thank you

yangheng95 commented 3 years ago

Maybe the issue you raised is about the implementation of LCF in PyABSA, because the code you refered is not contained in this repo. However, the text length considered the appended aspect, see here. So, they are the same, excluding some differences in implementation details.