FCKT: Fine-Grained Cross-Task Knowledge Transfer with Semantic Contrastive Learning for Targeted Sentiment Analysis
This repo contains the code and data of the following paper:
In this paper, we design a novel span-based framework for the task of targeted sentiment analysis., which is shown as below:
This framework consists of two components:
- Aspect extraction
- Sentiment prediction
Both of two components utilize BERT as backbone network.
- Python 3
- Pytorch 1.1
- numpy >= 1.13.3
Download the uncased BERT-Large model and unzip it in the current directory.
You can See more details in folder absa.
If you want to run the joint model, run the command blow, since the parameters of each data-set have been set:
python run.py
The catalog of downloaded models is as follows:
└─cache_bert_large
├─config.json
├─pytorch_model.bin
├─tokenizer_config.json
├─tokenizer.json
├─vocab.txtAnd the result are replaced in out/
If the code is used in your research, please star our repo and cite our paper as follows:
@inproceedings{chen2025fckt,
title={FCKT: Fine-Grained Cross-Task Knowledge Transfer with Semantic Contrastive Learning for Targeted Sentiment Analysis},
author={Chen, Wei and Zhang, Zhao and Yuan, Meng and Xu, Kepeng and Zhuang, Fuzhen},
booktitle={IJCAI},
year={2025}
}