Giter Club home page Giter Club logo

mdae-bert's Introduction

Multi-Domain Aspect Extraction using Bidirectional Encoder Representations from Transformers

This repository contains supplementary material of the paper "Multi-Domain Aspect Extraction using Bidirectional Encoder Representations from Transformers" submitted to the IEEE Access (under review).

Abstract: Deep learning and neural language models have obtained state-of-the-art results in aspects extraction tasks, in which the objective is to automatically extract characteristics of products and services that are the target of consumer opinion. However, these methods require a large amount of labeled data to achieve such results. Since data labeling is a costly task, there are no labeled data available for all domains. In this paper, we propose an approach for aspect extraction in a multi-domain transfer learning scenario, thereby leveraging labeled data from different source domains to extract aspects of a new unlabeled target domain. Our approach, called MDAE-BERT (Multi-Domain Aspect Extraction using Bidirectional Encoder Representations from Transformers), explores neural language models to deal with two major challenges in multi-domain learning: (1) inconsistency of aspects from target and source domains and (2) context-based semantic distance between ambiguous aspects. We evaluated our MDAE-BERT considering two perspectives (1) the aspect extraction performance using F1-Macro and Accuracy measures; and (2) by comparing the multi-domain aspect extraction models and single-domain models for aspect extraction. In the first perspective, our method outperforms the baseline. In the second perspective, our approach proved to be a competitive alternative compared to the single-domain model trained in a specific domain, even in the absence of labeled data from the target domain.


Opinion Mining is the task of extracting opinions or sentiments from unstructured texts using Natural Language Processing (NLP), Text Mining and Machine Learning. The key idea is to analyze automatically large review datasets to classify them into sentiment polarities (i.e., positive, negative or neutral).

Opinions are formally defined as a 5-tuple (ei, aij, sijkl, hk, tl), where ei is the i-th entity of the opinion, aij is the j-th aspect on which the opinion is related, sijkl is the sentiment contained in the opinion that can be positive, negative or neutral, hk is the k-th holder of the opinion and tl is temporal information about the opinion.

sentiment analysis example

Aspect-based sentiment analysis is the most promising scenario for Opinion Mining, providing a detailed analysis of consumers' opinions about products and services. However, it is a more complex scenario due to the requirement to extract aspects from the reviews before sentiment classification.

In this work we use the IOB representation for token labels. The IOB is short for inside, outside, beginning. Each token of a text in the training set is labeled with class B, which indicates that the token represents the beginning of an aspect; class I, which indicates that the token is inside an aspect; and class O, which indicates that the token is outside an aspect. The IOB representation is illustrated in Figures bellow:

iob example 1

iob example 2

Using a pre-trained MDAE-BERT model

If you want to use our pre-trained MDAE-BERT to extract aspect from reviews, then start with the MDAE-BERT API demo code. We trained MDAE-BERT with 15 datasets (available here) from different domains.

Training your own MDAE-BERT model

1. Requirements

To run is required a dataset file where each line represents an edge in the following format:

pip install -r requirements.txt

(Optional) 1.1 Datasets (you can use these datasets or your own)

download here

2. Train a MDAE-BERT model

To train a MDAE-BERT you need to provide the datasets separated by commas, as in the example below.

python train.py --datasets aspect_datasets/canon/canon.xml.seg,aspect_datasets/diaper_champ/diaper_champ.xml.seg

mdae-bert's People

Contributors

brucceneves avatar

Watchers

 avatar

mdae-bert's Issues

System Architecture

Hello,

I have 2 conceptual questions regarding your paper.

Q1: As I understood from your paper, you have to steps in MDAE-BERT. The first one is to learn contextualized word embeddings (using MLM) and the second one is token classification (using NSP). My question is are these 2 steps sequential? If so, how does the output of step 1 introduced to step 2?

Q2: BERT itself is trained on general text and can extract aspects from any domain, hence, what is the privilege of your work if BERT alone does so?

Output Explanation

Greetings and thanks for sharing your great efforts.

Could you knindly explain the output, what are these 3 vectors and where should I know the extracted aspect?
image

Thanks in advance.

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.