资源算法 BERT-E2E-ABSA

BERT-E2E-ABSA

2020-03-10 | |  65 |   0 |   0

BERT-E2E-ABSA

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

图片.png

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"
}


上一篇:seq2seq-keyphrase-bert

下一篇:BERT-Dureader

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...