Giter VIP home page Giter VIP logo

dpl's Introduction

Towards-Unifying-the-Label-Space-for-Aspect--and-Sentence-based-Sentiment-Analysis


Code repository for paper Towards Unifying the Label Space for Aspect- and Sentence-based Sentiment Analysis.

Set Up

Use the following commands to clone and install this package.

# environment
Ubuntu 20.04; cpu x86_64; 
GPU 2080ti; cuda V10.1;

# python environment
python == 3.6.12
torch == 1.2.0
transformers == 2.9.1

scripts

conda create -n DPL python==3.6
pip install torch==1.2.0
pip install -e requirements.txt

Example use

Download prepared shaped SemEval 2014 task4 dataset and our auxiliary dataset in the dataset/ directory: https://drive.google.com/file/d/1jYlkuBLxdQfk746o07E-ryagQ_qJ6zAU/view?usp=sharing

dataset
└── Biaffine
    └── glove
        ├── Laptops
        └── Restaurants

Download prepared pre-trained model in the pre_model/ directory: https://drive.google.com/file/d/1UdXFD88YaE9aGr1zaR7uN4X8wphmcabY/view?usp=sharing These models are published by Rietzler. You can also download them from Rietzler's url: Laptops & Restaurants.

pre_model
├── laptop
│   ├── added_tokens.json
│   ├── config.json
│   ├── pytorch_model.bin
│   ├── special_tokens_map.json
│   └── vocab.txt
└── rest
    ├── added_tokens.json
    ├── config.json
    ├── pytorch_model.bin
    ├── special_tokens_map.json
    └── vocab.txt

The final file list

.
├── README.md
├── __init__.py
├── dataset
├── experiment
├── img
├── layer
├── loader.py
├── main.py
├── model.py
├── pre_model
├── requirements.txt
├── train.py
├── utils
├── visual
└── vocabulary

Run:

cd experiment
bash run_resturant.sh

Citation

@inproceedings{zhang-etal-2022-towards,
    title = "Towards Unifying the Label Space for Aspect- and Sentence-based Sentiment Analysis",
    author = "Zhang, Yiming  and
      Zhang, Min  and
      Wu, Sai  and
      Zhao, Junbo",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2022",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-acl.3",
    doi = "10.18653/v1/2022.findings-acl.3",
    pages = "20--30",
}

dpl's People

Contributors

yiming-zh avatar

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.