Skip to content

zzhinlp/BTDM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTDM: A Bi-directional Translating Decoding Model Based On Relational Embedding For Relational Triple Extraction

This repository contains the source code and dataset for the paper: BTDM: A Bi-directional Translating Decoding Model Based On Relational Embedding For Relational Triple Extraction.

Overview

Requirements

The main requirements are:

  • Keras==2.3.1
  • numpy==1.23.5
  • tensorflow==2.3.1
  • torch==1.12.1
  • transformers==4.25.1
  • tqdm

Datasets

Usage

1. Get pre-trained BERT model for PyTorch

Download BERT-Base-Cased which contains pytroch_model.bin, vocab.txt and config.json. Put these under ./pretrained.

2. Build Data

Put our preprocessed datasets under ./datasets.

3. Train

Specify the running mode and dataset at the command line

python run.py ---train=train --dataset=NYT

4. Evaluate

Specify the running mode and dataset at the command line

python run.py ---train=test --dataset=NYT

About

The code of paper BTDM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages