This repo is to implement the method described in the accapted paper Mastering the Explicit Opinion-role Interaction: Syntax-aided Neural Transition System for Unified Opinion Role Labeling
Unified opinion role labeling (ORL) aims to detect all possible opinion structures of ‘opinion-holder-target’ in one shot, given a text. The existing transition-based unified method, unfortunately, is subject to longer opinion terms and fails to solve the term overlap issue. Current top performance has been achieved by employing the span-based graph model, which however still suffers from both high model complexity and insufficient interaction among opinions and roles. In this work, we investigate a novel solution by revisiting the transition architecture, and augmenting it with a pointer network (PointNet). The framework parses out all opinion structures in linear-time complexity, meanwhile breaks through the limitation of any length of terms with PointNet. To achieve the explicit opinion-role interactions, we further propose a unif ied dependency-opinion graph (UDOG), co-modeling the syntactic dependency structure and the partial opinion-role structure. We then devise a relation-centered graph aggregator (RCGA) to encode the multi-relational UDOG, where the resulting high-order representations are used to promote the predictions in the vanilla transition system.
Orignal data comes from MPQA v2.0.
We need to obtain the dependency sturcture and POS tags for each data, and save as json format. Pay attention to the file path and modify as needed
To parse the dependency structure and POS tags, we employ the CoreNLP provided by stanfordnlp. So please download relavant files first.
python preprocess.py
We also provide some preprocessed examples. If you want to use other datasets to train the model, please refer to the above steps.
python train_ptrtrans.py
python test.py
python train_synptrtrans.py
python test.py