Git Product home page Git Product logo

absa-vlsp2018's Introduction

Multi-Tasks Learning ABSA on Vietnamese Hotel Reviews

This repository focuses on the task of Aspect-Based Sentiment Analysis (ABSA) for Vietnamese Hotel Reviews. It provides implementations of multi-task learning techniques to enhance the performance of ABSA on this specific domain.

Introduction

Aspect-Based Sentiment Analysis is a natural language processing task that aims to identify and analyze sentiments expressed towards specific aspects within a text. In the context of this repository, ABSA is performed on Vietnamese hotel reviews, where the goal is to identify aspects (e.g., "FOOD#QUALITY," "HOTEL&ROOM#PRICES) and their corresponding sentiment polarities (e.g., positive, negative, neutral).

We focus on the task of text-level Aspect-Based Sentiment Analysis (ABSA).

Annotate Custom Dataset

This repository provides a framework that simplifies the process of annotating data for the Aspect-Based Sentiment Analysis (ABSA) text-level problem. It includes an annotation tool and instructions on how to set it up and use it with your custom dataset.

Annotation Tool Setup

please ensure that Streamlit is installed in your environment. You can install it by running the following command:

pip install streamlit

To run the annotation tool, execute the following command: streamlit run Annotation_lab.py

Dataset Format

Ensure that your custom data is structured as follows:

#1
text1
{FOOD#STYLE&OPTIONS, neutral}, {FOOD#QUALITY, neutral}

#2
text2  #reviews
       #label (blank if not annotated)

...

Configuration

To configure the annotation tool to match your dataset, you can modify or create a new YAML config file.

Note: Example config file for our dataset: `config/absa_config_anno.yaml

Prepare Environment

Requirements

Install the necessary dependencies by running: pip install -r requirements.txt

Model Configuration Setup

Please organize your configuration file for training and evaluation in the following structure:

Main-folder/
│
├── config/ 
│   ├── absa_model.yaml - This file contains configuration for training model
|   │
|	└── absa_anno_config.yaml
└── ...

Usage

Training

In this project, we focus on training Network based on pretrainded PhoBert embedding model. Executing the following command for trainning:

python trainer.py

If you want to fine-tune the embedding model, set freeze_embedder: False in config/absa_model.yaml file.

Note: When making any changes or customizations for training on a custom dataset, remember to update the config/absa_model.yaml file according to your data.

Evaluation

To evaluate the model on the test set, use the following command:

python eval.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.