This is the source code of our COLING 2020 paper <SentiX: A Sentiment-Aware Pre-Trained Model for Cross-domain Sentiment Analysis>
- Python 3.6 or higher.
- PyTorch 1.2.0.
- transformers PyTorch 1.2.0.
The following pre-trained models are available for download from Google Drive:
SentiX
: PyTorch version, same setting with BERT-base,loading model with transformers.
To train SentiX, simply run:
python pretrain_multigpu_final.py --dataset data_all --max_seq_len 256 --batch_size 16 --gradient_accumulation_steps 4
To test after setting model path:
run_multidomain_sentiment_analysis.sh
- pretrain_multigpu_final.py: main file of pre-trained model
- data_processing: data processing
- models: our models
- data_utils_pretrain_final.py: data_loader