All Projects → AlexGidiotis → Document Classifier Lstm

AlexGidiotis / Document Classifier Lstm

Licence: mit
A bidirectional LSTM with attention for multiclass/multilabel text classification.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Document Classifier Lstm

automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-68.38%)
Mutual labels:  text-classification, recurrent-neural-networks, lstm, attention-mechanism
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (-16.18%)
Mutual labels:  lstm, text-classification, recurrent-neural-networks
Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (-7.35%)
Mutual labels:  lstm, recurrent-neural-networks, 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 (-85.29%)
Mutual labels:  recurrent-neural-networks, lstm, attention-mechanism
Linear Attention Recurrent Neural Network
A recurrent attention module consisting of an LSTM cell which can query its own past cell states by the means of windowed multi-head attention. The formulas are derived from the BN-LSTM and the Transformer Network. The LARNN cell with attention can be easily used inside a loop on the cell state, just like any other RNN. (LARNN)
Stars: ✭ 119 (-12.5%)
Mutual labels:  lstm, recurrent-neural-networks, attention-mechanism
Textclassifier
Text classifier for Hierarchical Attention Networks for Document Classification
Stars: ✭ 985 (+624.26%)
Mutual labels:  text-classification, recurrent-neural-networks, attention-mechanism
Simplednn
SimpleDNN is a machine learning lightweight open-source library written in Kotlin designed to support relevant neural network architectures in natural language processing tasks
Stars: ✭ 81 (-40.44%)
Mutual labels:  recurrent-neural-networks, attention-mechanism
Language Translation
Neural machine translator for English2German translation.
Stars: ✭ 82 (-39.71%)
Mutual labels:  lstm, recurrent-neural-networks
Abstractive Summarization
Implementation of abstractive summarization using LSTM in the encoder-decoder architecture with local attention.
Stars: ✭ 128 (-5.88%)
Mutual labels:  lstm, attention-mechanism
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-29.41%)
Mutual labels:  lstm, recurrent-neural-networks
Lstm Ctc Ocr
using rnn (lstm or gru) and ctc to convert line image into text, based on torch7 and warp-ctc
Stars: ✭ 70 (-48.53%)
Mutual labels:  lstm, recurrent-neural-networks
Multitask sentiment analysis
Multitask Deep Learning for Sentiment Analysis using Character-Level Language Model, Bi-LSTMs for POS Tag, Chunking and Unsupervised Dependency Parsing. Inspired by this great article https://arxiv.org/abs/1611.01587
Stars: ✭ 93 (-31.62%)
Mutual labels:  lstm, recurrent-neural-networks
Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-28.68%)
Mutual labels:  lstm, recurrent-neural-networks
Ai Reading Materials
Some of the ML and DL related reading materials, research papers that I've read
Stars: ✭ 79 (-41.91%)
Mutual labels:  lstm, recurrent-neural-networks
Hierarchical Attention Networks
TensorFlow implementation of the paper "Hierarchical Attention Networks for Document Classification"
Stars: ✭ 75 (-44.85%)
Mutual labels:  text-classification, attention-mechanism
Text classification
Text Classification Algorithms: A Survey
Stars: ✭ 1,276 (+838.24%)
Mutual labels:  text-classification, recurrent-neural-networks
Sarcasm Detection
Detecting Sarcasm on Twitter using both traditonal machine learning and deep learning techniques.
Stars: ✭ 73 (-46.32%)
Mutual labels:  text-classification, attention-mechanism
Stockprediction
Plain Stock Close-Price Prediction via Graves LSTM RNNs
Stars: ✭ 134 (-1.47%)
Mutual labels:  lstm, recurrent-neural-networks
Hierarchical Multi Label Text Classification
The code of CIKM'19 paper《Hierarchical Multi-label Text Classification: An Attention-based Recurrent Network Approach》
Stars: ✭ 133 (-2.21%)
Mutual labels:  text-classification, attention-mechanism
Keras bert classification
Bert-classification and bert-dssm implementation with keras.
Stars: ✭ 67 (-50.74%)
Mutual labels:  lstm, text-classification

Document-Classifier-LSTM

Recurrent Neural Networks for multilclass, multilabel classification of texts. The models that learn to tag samll texts with 169 different tags from arxiv.

In classifier.py is implemented a standard BLSTM network with attention.

In hatt_classifier.py you can find the implementation of Hierarchical Attention Networks for Document Classification.

The neural networks were built using Keras and Tensorflow.

The best performing model is the attention BLSTM that achieves a micro f-score of 0.67 on the test set.

The Hierarchical Attention Network achieves only 0.65 micro f-score.

I am using 500k paper abstracts from arxiv. In order to download your own data refer to the arxiv OAI api.

Pretrained word embeddings can be used. The embeddings can either be GloVe or Word2Vec. You can download the GoogleNews-vectors-negative300.bin or the GloVe embeddings.

Usage:

  1. In order to train your own model you must prepare your data set using the data_prep.py script. The preprocessing converts to lower case, tokenizes and removes very short words. The preprocessed files and label files should be saved in a /data folder.

  2. You can now run classifier.py or hatt_classifier.py to build and train the models.

  3. The trained models are exported to json and the weights to h5 for later use.

  4. You can use utils.visualize_attention to visualize the attention weights.

Requirements

Run pip install -r requirements.txt to install the requirements.

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].