Skip to content

ChocoWu/Synfue-PAOTE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syntax fusion Encoder for the PAOTE task (Synfue)

This repository implements the method described in the paper Learn from Syntax: Improving Pair-wise Aspect and Opinion Terms Extraction with Rich Syntactic Knowledge

Prerequisite

Usage (by examples)

Data

Orignal data comes from TOWE.

Preprocessing

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.

Get Dependency and POS

To parse the dependency structure and POS tags, we employ the CoreNLP provided by stanfordnlp. So please download relavant files first and put it in data/datasets/orignal. We use the NLTK package to obtain the dependency and POS parsing, so we need to modify the code as follows in process.py line 24:

depparser = CoreNLPDependencyParser(url='http://127.0.0.1:9000')

The url is set according to the real scenario.

Save

  python preprocess.py

The proposed data will be sotored in the dicretory data/datasets/towe/. We also provide some preprocessed examples.

Train

We use embedding bert-cased by bert-base-cased (768d)

  python synfue.py train --config configs/16res_train.conf

Test

  python synfue.py eval --config configs/16res_eval.conf

Note

this code refers to the SpERT

About

Source code for IJCAI 2021 paper: Learn from Syntax: Improving Pair-wise Aspect and Opinion Terms Extraction with Rich Syntactic Knowledge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published