Home

Awesome

Relation-Classification

Relation Classification - SEMEVAL 2010 task 8 dataset (Master's Thesis)

Cite Us As

@MastersThesis{Sahitya:2018,
 author = { {Sahitya Patel} and Harish Karnick}, 
 title = {Multi-Way Classification of Relations Between Pairs of Entities}, 
 school = {Indian Institute of Technology Kanpur (IITK)}, 
 address = {India},
 year = 2018, 
 month = 6
}

Presentation

Relation-Classification-github.pdf

Dataset

Paper: SemEval-2010 Task 8: Multi-Way Classification of Semantic Relations Between Pairs of Nominals

Zip: SemEval2010_task8_all_data.zip

Files

Preprocessing of data

Model training

Environment

Running the model without preprocessing

  1. Get preprocessed data. Download "data_all.npy" from this-link (94.6 MB) and put it in the folder "./data/".
  2. Run "04_CBGRU_MEA_Model"

Running the model with preprocessing

01_create_train_test_attn

Description: Pre-processing of dataset files

Reads:

Creates:

To Do:

  1. Set the following path in "01_create_train_test_attn"
os.environ['CLASSPATH'] = "H:/Relation-Classification/stanford/stanford-postagger-2017-06-09"
  1. Run "01_create_train_test_attn"

02_train_val_split

Description: Spliting of the training data into training and validation data

Reads:

Creates:

To Do:

  1. Run "02_train_val_split"

03_data_preprocess

Description: Generating a single input file for the model

Creates:

Steps:

  1. Place "GoogleNews-vectors-negative300.bin" in "./word_embeddings" folder. (Download-Link, Website-word2vec)
  2. Run "./word_embeddings/GoogleNews-vectors-negative300_bin_to_txt.py" to create "./word_embeddings/GoogleNews-vectors-negative300.txt"
  3. Run "03_data_preprocess"

04_CBGRU_MEA_Model

Description: Model training. Best model is saved in "./model" folder.

Steps:

  1. Run "04_CBGRU_MEA_Model"

Creates:

Model CBGRU-MEA

Model CBGRU-MEA