All Projects → cbaziotis → ntua-slp-semeval2018

cbaziotis / ntua-slp-semeval2018

Licence: MIT license
Deep-learning models of NTUA-SLP team submitted in SemEval 2018 tasks 1, 2 and 3.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ntua-slp-semeval2018

SentimentAnalysis
Sentiment Analysis: Deep Bi-LSTM+attention model
Stars: ✭ 32 (-59.49%)
Mutual labels:  sentiment-analysis, lstm, semeval, attention-mechanism
Datastories Semeval2017 Task4
Deep-learning model presented in "DataStories at SemEval-2017 Task 4: Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis".
Stars: ✭ 184 (+132.91%)
Mutual labels:  sentiment-analysis, lstm, attention, attention-mechanism
Multimodal Sentiment Analysis
Attention-based multimodal fusion for sentiment analysis
Stars: ✭ 172 (+117.72%)
Mutual labels:  sentiment-analysis, lstm, attention, attention-mechanism
datastories-semeval2017-task6
Deep-learning model presented in "DataStories at SemEval-2017 Task 6: Siamese LSTM with Attention for Humorous Text Comparison".
Stars: ✭ 20 (-74.68%)
Mutual labels:  lstm, attention, semeval, attention-mechanism
SA-DL
Sentiment Analysis with Deep Learning models. Implemented with Tensorflow and Keras.
Stars: ✭ 35 (-55.7%)
Mutual labels:  sentiment-analysis, semeval, attention-mechanism
Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (+59.49%)
Mutual labels:  lstm, attention, attention-mechanism
Text Classification Keras
📚 Text classification library with Keras
Stars: ✭ 53 (-32.91%)
Mutual labels:  sentiment-analysis, lstm, attention
NTUA-slp-nlp
💻Speech and Natural Language Processing (SLP & NLP) Lab Assignments for ECE NTUA
Stars: ✭ 19 (-75.95%)
Mutual labels:  sentiment-analysis, attention, attention-mechanism
Hierarchical-Word-Sense-Disambiguation-using-WordNet-Senses
Word Sense Disambiguation using Word Specific models, All word models and Hierarchical models in Tensorflow
Stars: ✭ 33 (-58.23%)
Mutual labels:  lstm, attention, attention-mechanism
Absa keras
Keras Implementation of Aspect based Sentiment Analysis
Stars: ✭ 126 (+59.49%)
Mutual labels:  sentiment-analysis, attention, attention-mechanism
lstm-attention
Attention-based bidirectional LSTM for Classification Task (ICASSP)
Stars: ✭ 87 (+10.13%)
Mutual labels:  attention, attention-mechanism, emotion-recognition
automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-45.57%)
Mutual labels:  lstm, attention, attention-mechanism
visualization
a collection of visualization function
Stars: ✭ 189 (+139.24%)
Mutual labels:  attention, attention-mechanism
h-transformer-1d
Implementation of H-Transformer-1D, Hierarchical Attention for Sequence Learning
Stars: ✭ 121 (+53.16%)
Mutual labels:  attention, attention-mechanism
iPerceive
Applying Common-Sense Reasoning to Multi-Modal Dense Video Captioning and Video Question Answering | Python3 | PyTorch | CNNs | Causality | Reasoning | LSTMs | Transformers | Multi-Head Self Attention | Published in IEEE Winter Conference on Applications of Computer Vision (WACV) 2021
Stars: ✭ 52 (-34.18%)
Mutual labels:  lstm, attention
EBIM-NLI
Enhanced BiLSTM Inference Model for Natural Language Inference
Stars: ✭ 24 (-69.62%)
Mutual labels:  lstm, attention
LSTM-sentiment-analysis
LSTM sentiment analysis. Please look at my another repo for SVM and Naive algorithem
Stars: ✭ 19 (-75.95%)
Mutual labels:  sentiment-analysis, lstm
learningspoons
nlp lecture-notes and source code
Stars: ✭ 29 (-63.29%)
Mutual labels:  lstm, attention
sarcasm-detection-for-sentiment-analysis
Sarcasm Detection for Sentiment Analysis
Stars: ✭ 21 (-73.42%)
Mutual labels:  sentiment-analysis, lstm
Im2LaTeX
An implementation of the Show, Attend and Tell paper in Tensorflow, for the OpenAI Im2LaTeX suggested problem
Stars: ✭ 16 (-79.75%)
Mutual labels:  attention, attention-mechanism

Overview

This repository contains the source code of the models submitted by NTUA-SLP team in SemEval 2018 tasks 1, 2 and 3.

Prerequisites

Please follow the steps below in order to be able to train our models:

1 - Install Requirements

pip install -r ./requirements.txt

2 - Download our pre-trained word embeddings

The models were trained on top of word2vec embeddings pre-trained on a big collection of Twitter messages. We collected a big dataset of 550M English Twitter messages posted from 12/2014 to 06/2017. For training the word embeddings we used Gensim's implementation of word2vec. For preprocessing the tweets we used ekphrasis. Finally, we used the following parameteres for training the embeddings: window_size = 6, negative_sampling = 5 and min_count = 20.

We freely share our pre-trained embeddings:

Finally, you should put the downloaded embeddings file in the /embeddings folder.

3 - Update model configs

Our model definitions are stored in a python configuration file. Each config contains the model parameters and things like the batch size, number of epochs and embeddings file. You should update the embeddings_file parameter in the model's configuration in model/params.py.

Example - Sentiment Analysis on SemEval 2017 Task 4A

You can test that you have a working setup, by training a sentiment analysis model on SemEval 2017 Task 4A, which is used as a source task for transfer learning in Task 1.

First, start the visdom server, which is needed for visualizing the training progress.

python -m visdom.server

Then just run the experiment.

python model/pretraining/sentiment2017.py

Documentation

TL;DR

  • If you only care about the source code of our deep-learning models, then look at the PyTorch modules in modules/nn/.
  • In particular, modules/nn/attention.py contains an implementation of a self-attention mechanism, which supports multi-layer attention.
  • The scripts for running an experiment are stored in model/taskX.

Project Structure

In order to make our codebase more accessible and easier to extend, we provide an overview of the structure of our project. The most important parts will be covered in greater detail.

  • datasets: contains the datasets for the pretrainig (SemEval 2017 - Task4A)
  • dataloaders - contains scripts for loading the datasets and for tasks 1, 2 and 3
  • embeddings: in this folder you should put the word embedding files.
  • logger: contains the source code for the Trainer class and the accompanying helper functions for experiment management, including experiment logging, checkpoint and early-stoping mechanism and visualization of the training process.
  • model: experiment runner scripts (dataset loading, training pipeline etc).
    • pretraining: the scripts for training the TL models
    • task1: the scripts for running the models for Task 1
    • task2: the scripts for running the models for Task 2
    • task3: the scripts for running the models for Task 3
  • modules: the source code of the PyTorch deep-learning models and the baseline models.
    • nn: the source code of the PyTorch modules
    • sklearn: scikit-learn Transformers for implementing the baseline bag-of-word and neural bag-of-words models
  • out: this directory contains the generated model predictions and their corresponding attention files
  • predict: scripts for generating predictions from saved models.
  • trained: this is where all the model checkpoints are saved.
  • utils: contains helper functions

Note: Full documentation of the source code will be posted soon.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].