Giter Site home page Giter Site logo

slot-tagging-for-natural-language-utterances's Introduction

Slot Tagging for Natural Language Utterances

Introduction

The goal of this project is to train a model to tag slots in natural language utterances of users addressing a virtual personal assistant.

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:

    # create a virtual environment
    py -m venv env
    # windows only
    env\Scripts\activate
    # linux or mac
    source env/bin/activate
    
    # install requirements
    pip install -r requirements.txt

Alsp you should download glove embeddings from here and put them in the data folder. The zip file contains 3 files, we only use the glove.6B.100d.txt file.

If the file is too big, you can use the glove.6B.50d.txt file instead. After that you should change the input_dim (embedding size) to 50.

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 assignment, 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, Dec 2022

slot-tagging-for-natural-language-utterances'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.