GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Trisha11r/Relation_Classification_NLP: Given 10 predefined relations like cause-effect, product-producer, etc., the goal was to define the relation and the direction of the relation between 2 entities in a sentence.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.DS_Store
.DS_Store
 
 
CNN_model_architecture.png
CNN_model_architecture.png
 
 
CNN_test_prediction_1.txt
CNN_test_prediction_1.txt
 
 
CNN_test_prediction_2.txt
CNN_test_prediction_2.txt
 
 
CNN_test_prediction_3.txt
CNN_test_prediction_3.txt
 
 
README.md
README.md
 
 
basic_test_prediction.txt
basic_test_prediction.txt
 
 
model.py
model.py
 
 
train_CNN.py
train_CNN.py
 
 
train_lib.py
train_lib.py
 
 

Repository files navigation

Relation_Classification_NLP

Given 10 predefined relations like cause-effect, product-producer, etc, the goal is to define the relation and the direction of the relation between 2 entities in a sentence. The implemtation consists of a basic BiGRU model and a CNN model with outperforms the basic model.

The CNN model has been used as even after adding POS and dependency features the CNN model outperforms the biGRU model (basic model).The convolution layer is defined using keras layer implementation of Conv1D and max-pool using keras layer implementation of GlobalMaxPool1D. Define decoder using its keras layer implementation. In the call function, first the window processing is done using embedding_lookup for word and pos embeddings. Then we concatenate word and pos embeddings and then apply convolution on the concatenated output. Then max-pooling is done by calling the previously defined max_pool layer. At last, we extract sentence level features using the previously defined decoder.

The CNN model has been implemented with one convolutional layer. The architecture details are described in below Figure.

Observations (CNN Model):

Regularization lambda value when set to (10)^(-4):
 - Val loss for last epoch (09): 2.0366
 - Val F1 score: 0.5981
Training the model for word embeddings and dependency features:
 - Val loss for epoch: 2.0204
 - Val F1 score: 0.6044
Training the model for word embeddings and POS features:
 - Val loss for epoch: 2.323
 - Val F1 score: 0.5065
The prediction files for each have been uploaded.

About

Given 10 predefined relations like cause-effect, product-producer, etc., the goal was to define the relation and the direction of the relation between 2 entities in a sentence.

Topics

bi-grucnn-kerascnn-modelcnn-model-tunningnlpnlp-dependency-parsingnlp-machine-learningrelation-classification

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.