songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LCF BERT inputs

dimtsintzou opened this issue · comments

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

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.