Giter VIP home page Giter VIP logo

adwe-cnn's Introduction

CLE4ATE

[Context-Aware Dynamic Word Embeddings For Aspect Term Extraction](submitted to IEEE Transactions on Affective Computing and Affective Language Resources).

Data

[Laptop] [Restaurant 16]:

Requirements

  • pytorch=1.3.1
  • python=3.7.5
  • transformers=2.3.0
  • dgl=0.5

Steps to Run Code

  • Step 1:

Download official datasets and official evaluation scripts. We assume the following file names. SemEval 2014 Laptop (http://alt.qcri.org/semeval2014/task4/):

semeval/Laptops_Test_Data_PhaseA.xml
semevalLaptops_Test_Gold.xml
semeval/eval.jar

SemEval 2016 Restaurant (http://alt.qcri.org/semeval2016/task5/)

semeval/EN_REST_SB1_TEST.xml.A
semeval/EN_REST_SB1_TEST.xml.gold
semeval/A.jar

pre-trained embedding [data]

  • Step 2:

Train:

python train_laptop.py 
python train_res.py
  • Step 3:

Evaluate:

python evaluation_laptop.py [checkpoints]

python evaluation_res.py [checkpoints]

Baselines

Kindly note that for reproducing the results of the following baselines, we use anaconda to create a new environment for each paper following the corresponding readme of their codes.

  1. DE-CNN [paper] [code] [checkpoints]
  2. Seq4Seq [paper] [code] [checkpoints]
  3. MT-TSMSA [paper] [code] [checkpoints]
  4. CL-BERT [paper] [code] [checkpoints]

Beside, we also modify the CL-BERT model, i.e., we add domain embedding to the representation of words. The code is in the [CL-BERT-new]

Step 1: Download datasets and pre-trained model weight from [code], and place these pre-trained model weight files as:

bert-pt/bert-laptop/ bert-pt/bert-rest/

Step 2: Train and evaluate:

python main.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.