All Projects → sgrvinod → A Pytorch Tutorial To Text Classification

sgrvinod / A Pytorch Tutorial To Text Classification

Licence: mit
Hierarchical Attention Networks | a PyTorch Tutorial to Text Classification

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to A Pytorch Tutorial To Text Classification

rnn-text-classification-tf
Tensorflow implementation of Attention-based Bidirectional RNN text classification.
Stars: ✭ 26 (-85.87%)
Mutual labels:  text-classification, attention-mechanism
Text classification
all kinds of text classification models and more with deep learning
Stars: ✭ 7,179 (+3801.63%)
Mutual labels:  text-classification, attention-mechanism
3HAN
An original implementation of "3HAN: A Deep Neural Network for Fake News Detection" (ICONIP 2017)
Stars: ✭ 29 (-84.24%)
Mutual labels:  text-classification, attention-mechanism
Text-Classification-LSTMs-PyTorch
The aim of this repository is to show a baseline model for text classification by implementing a LSTM-based model coded in PyTorch. In order to provide a better understanding of the model, it will be used a Tweets dataset provided by Kaggle.
Stars: ✭ 45 (-75.54%)
Mutual labels:  text-classification, pytorch-tutorial
A Pytorch Tutorial To Image Captioning
Show, Attend, and Tell | a PyTorch Tutorial to Image Captioning
Stars: ✭ 1,867 (+914.67%)
Mutual labels:  pytorch-tutorial, attention-mechanism
automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-76.63%)
Mutual labels:  text-classification, attention-mechanism
Chatbot cn
基于金融-司法领域(兼有闲聊性质)的聊天机器人,其中的主要模块有信息抽取、NLU、NLG、知识图谱等,并且利用Django整合了前端展示,目前已经封装了nlp和kg的restful接口
Stars: ✭ 791 (+329.89%)
Mutual labels:  text-classification, attention-mechanism
Textclassifier
Text classifier for Hierarchical Attention Networks for Document Classification
Stars: ✭ 985 (+435.33%)
Mutual labels:  text-classification, attention-mechanism
Hierarchical Attention Networks
TensorFlow implementation of the paper "Hierarchical Attention Networks for Document Classification"
Stars: ✭ 75 (-59.24%)
Mutual labels:  text-classification, attention-mechanism
Sarcasm Detection
Detecting Sarcasm on Twitter using both traditonal machine learning and deep learning techniques.
Stars: ✭ 73 (-60.33%)
Mutual labels:  text-classification, attention-mechanism
Document Classifier Lstm
A bidirectional LSTM with attention for multiclass/multilabel text classification.
Stars: ✭ 136 (-26.09%)
Mutual labels:  text-classification, attention-mechanism
Hierarchical Multi Label Text Classification
The code of CIKM'19 paper《Hierarchical Multi-label Text Classification: An Attention-based Recurrent Network Approach》
Stars: ✭ 133 (-27.72%)
Mutual labels:  text-classification, attention-mechanism
Pytorch Question Answering
Important paper implementations for Question Answering using PyTorch
Stars: ✭ 154 (-16.3%)
Mutual labels:  pytorch-tutorial, attention-mechanism
A Pytorch Tutorial To Object Detection
SSD: Single Shot MultiBox Detector | a PyTorch Tutorial to Object Detection
Stars: ✭ 2,398 (+1203.26%)
Mutual labels:  pytorch-tutorial
Captcha break
验证码识别
Stars: ✭ 2,268 (+1132.61%)
Mutual labels:  pytorch-tutorial
Pytorch Practice
Some example scripts on pytorch
Stars: ✭ 166 (-9.78%)
Mutual labels:  pytorch-tutorial
Textanalyzer
A text analyzer which is based on machine learning,statistics and dictionaries that can analyze text. So far, it supports hot word extracting, text classification, part of speech tagging, named entity recognition, chinese word segment, extracting address, synonym, text clustering, word2vec model, edit distance, chinese word segment, sentence similarity,word sentiment tendency, name recognition, idiom recognition, placename recognition, organization recognition, traditional chinese recognition, pinyin transform.
Stars: ✭ 162 (-11.96%)
Mutual labels:  text-classification
Kashgari
Kashgari is a production-level NLP Transfer learning framework built on top of tf.keras for text-labeling and text-classification, includes Word2Vec, BERT, and GPT2 Language Embedding.
Stars: ✭ 2,235 (+1114.67%)
Mutual labels:  text-classification
Multimodal Sentiment Analysis
Attention-based multimodal fusion for sentiment analysis
Stars: ✭ 172 (-6.52%)
Mutual labels:  attention-mechanism
Lotclass
[EMNLP 2020] Text Classification Using Label Names Only: A Language Model Self-Training Approach
Stars: ✭ 160 (-13.04%)
Mutual labels:  text-classification

This is a PyTorch Tutorial to Text Classification.

This is the fourth in a series of tutorials I plan to write about implementing cool models on your own with the amazing PyTorch library.

Basic knowledge of PyTorch, recurrent neural networks is assumed.

If you're new to PyTorch, first read Deep Learning with PyTorch: A 60 Minute Blitz and Learning PyTorch with Examples.

Questions, suggestions, or corrections can be posted as issues.

I'm using PyTorch 1.1 in Python 3.6.


27 Jan 2020: Working code for two new tutorials has been added — Super-Resolution and Machine Translation


Contents

Objective

Concepts

Overview

Implementation

Training

Inference

Frequently Asked Questions

Objective

To build a model that can label a text document as one of several categories.

We will be implementing the Hierarchial Attention Network (HAN), one of the more interesting and interpretable text classification models.

This model not only classifies a document, but also chooses specific parts of the text – sentences and individual words – that it thinks are most important.


"I think I'm falling sick. There was some indigestion at first. But now a fever is beginning to take hold."


"But think about it! It's so cool. Physics is really all about math. What Feynman said, hehe."


"I want to tell you something important. Get into the stock market and investment funds. Make some money so you can buy yourself some yogurt."


"How do computers work? I have a CPU I want to use. But my keyboard and motherboard do not help."

"You can just google how computers work. Honestly, its easy."


"You know what's wrong with this country? Republicans and democrats. Always at each other's throats"

"There's no respect, no bipartisanship."


Tutorial in Progress

I am still writing this tutorial.

In the meantime, you could take a look at the code – it works!

We achieve an accuracy of 75.1% (against 75.8% in the paper) on the Yahoo Answer dataset.

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