moneyDboat / BERT-E2E-ABSA

Exploiting BERT for End-to-End Aspect-based Sentiment Analysis (W-NUT@EMNLP'19)

Home Page:https://arxiv.org/abs/1910.00883

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BERT-E2E-ABSA

Exploiting BERT End-to-End Aspect-Based Sentiment Analysis

Requirements

Architecture

  • Pre-trained embedding layer: BERT-Base-Uncased (12-layer, 768-hidden, 12-heads, 110M parameters)
  • Task-specific layer:
    • Linear
    • Recurrent Neural Networks (GRU)
    • Self-Attention Networks (SAN, TFM)
    • Conditional Random Fields (CRF)

Dataset

  • Restaurant: retaurant reviews from SemEval 2014 (task 4), SemEval 2015 (task 12) and SemEval 2016 (task 5)
  • Laptop: laptop reviews from SemEval 2014

Quick Start

  • Reproduce the results on Restaurant and Laptop dataset:

    # train the model with 5 different seed numbers
    python fast_run.py 
    
  • Train the model on other ABSA dataset:

    1. place data files in the directory ./data/[YOUR_DATASET_NAME].

    2. set TASK_NAME in train.sh as [YOUR_DATASET_NAME].

    3. train the model: sh train.sh

  • (** New feature **) Perform pure inference/direct transfer over test/unseen data using the trained ABSA model:

    1. place data file in the directory ./data/[YOUR_EVAL_DATASET_NAME].

    2. set TASK_NAME in work.sh as [YOUR_EVAL_DATASET_NAME]

    3. set ABSA_HOME in work.sh as [HOME_DIRECTORY_OF_YOUR_ABSA_MODEL]

    4. run: sh work.sh

Environment

  • OS: REHL Server 6.4 (Santiago)
  • GPU: NVIDIA GTX 1080 ti
  • CUDA: 10.0
  • cuDNN: v7.6.1

Citation

If the code is used in your research, please star our repo and cite our paper as follows:

@inproceedings{li-etal-2019-exploiting,
    title = "Exploiting {BERT} for End-to-End Aspect-based Sentiment Analysis",
    author = "Li, Xin  and
      Bing, Lidong  and
      Zhang, Wenxuan  and
      Lam, Wai",
    booktitle = "Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019)",
    year = "2019",
    url = "https://www.aclweb.org/anthology/D19-5505",
    pages = "34--41"
}

About

Exploiting BERT for End-to-End Aspect-based Sentiment Analysis (W-NUT@EMNLP'19)

https://arxiv.org/abs/1910.00883

License:Apache License 2.0


Languages

Language:Python 98.6%Language:Shell 1.4%