Code Monkey home page Code Monkey logo

relation-extraction-from-natural-language's Introduction

Relation Extraction from Natural Language using PyTorch

Introduction

in this homework, we will implement a relation extraction model using PyTorch. The model is based on the

Requirements

The project uses Python 3.10 which has some linting defaults which may cause import errors if using python < 3.10 and PyTorch

The requirements can be installed using the following command:

    pip install -r requirements.txt

Running the code

The code has been written in jupyter notebook so that each part can be run individually and test different senarios and variables along the way. The notebook can also be imported into colab as well if you prefer working in the cloud GPU.

Project Structure

The project is structured as follows:

    .
    ├── data
    │   ├── hw1_test-2.csv
    │   ├── hw1_train-2.csv
    │   └── sampleSubmission-2.csv
    ├── output
    │   ├── best_model.pt
    │   └── submission_labels.csv
    ├── README.md
    ├── requirements.txt
    └── notebook.ipynb

The data folder contains the data files for the project. The notebook is a jupyter notebook which contains the code for the project.

Model

For this task, I've used different models with different structres, including bi-LSTM, MLP, with different number of hidden layers and methods like dropout, different learning rate, and using leaky relu activation.

Authors

Parsa Mazaheri, November 2022

relation-extraction-from-natural-language's People

Contributors

parsa-mz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.