This is an implementation of our paper in COLING2020:
One Comment from One Perspective: An Effective Strategy for Enhancing Automatic Music Comment Paper Path
This code is based on our baseline MMPMS: MMPMS
- Python == 3.7
- PaddlePaddle == 1.8.1
- NLTK == 3.4.5
- numpy == 1.18.1
- pandas == 1.0.3
/dataset : two datasets constructed by us
/data/ES_newdata/ : data path
/models : models design
/output : logs and results
run.py : train or referece
eval.py : eval the result of inference
The vocabulary and the preprocessed data will be saved in the folder:
data/ES_newdata/
├── music.train need to prepare
├── music.test need to prepare
├── music.valid need to prepare
├── music.train.pkl
├── music.valid.pkl
├── music.test.pkl
├── addcomments_small_embedding.txt embedding file, need to prepare: https://ai.tencent.com/ailab/nlp/en/index.html
└── vocab.json
Preprocess the data by running preprocess.py :
python preprocess.py
To train a model, run:
python run.py
Not use the distinction:
python run.py --fLoss_mode no
Use gpus:
python run.py --use_gpu True
python run.py --infer --model_dir MODEL_DIR --result_file RESULT_FILE
python eval.py RESULT_FILE