Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.78 KB

File metadata and controls

46 lines (33 loc) · 1.78 KB

Code for "Ranking Based Multi-Label Classification for Sentiment Analysis" LKE 2019(7th International Symposium on Language & Knowledge Engineering).

Steps to run

  1. Download datasets

    Unzip these datasets in data folder and use the parser.py to convert them into .json format.

    mkdir data && cd data
    # unzip the datasets in `data`
    python3 parser.py
  2. Download pretrained model

    mkdir models && cd models
    mkdir bert-base-chinese && cd bert-base-chinese
    wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese.tar.gz
    tar -zxvf bert-base-chinese.tar.gz
    wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese-vocab.txt
    cd ..
    mkdir bert-base-uncased && cd bert-base-uncased
    wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased.tar.gz
    tar -zxvf bert-base-uncased.tar.gz
    wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt
  3. Train the model

    python3 bert_classifier.py

References