All Projects → stefan-it → Capsnet Nlp

stefan-it / Capsnet Nlp

Licence: agpl-3.0
CapsNet for NLP

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Capsnet Nlp

Char Rnn Tensorflow
Multi-layer Recurrent Neural Networks for character-level language models implements by TensorFlow
Stars: ✭ 58 (-12.12%)
Mutual labels:  natural-language-processing
Slate
A Super-Lightweight Annotation Tool for Experts: Label text in a terminal with just Python
Stars: ✭ 61 (-7.58%)
Mutual labels:  natural-language-processing
Multilingual Latent Dirichlet Allocation Lda
A Multilingual Latent Dirichlet Allocation (LDA) Pipeline with Stop Words Removal, n-gram features, and Inverse Stemming, in Python.
Stars: ✭ 64 (-3.03%)
Mutual labels:  natural-language-processing
Botsharp
The Open Source AI Chatbot Platform Builder in 100% C# Running in .NET Core with Machine Learning algorithm.
Stars: ✭ 1,103 (+1571.21%)
Mutual labels:  natural-language-processing
Fromscratch
Stars: ✭ 61 (-7.58%)
Mutual labels:  natural-language-processing
Repo 2017
Python codes in Machine Learning, NLP, Deep Learning and Reinforcement Learning with Keras and Theano
Stars: ✭ 1,123 (+1601.52%)
Mutual labels:  natural-language-processing
Comet
A Neural Framework for MT Evaluation
Stars: ✭ 58 (-12.12%)
Mutual labels:  natural-language-processing
Convai Bot 1337
NIPS Conversational Intelligence Challenge 2017 Winner System: Skill-based Conversational Agent with Supervised Dialog Manager
Stars: ✭ 65 (-1.52%)
Mutual labels:  natural-language-processing
How To Mine Newsfeed Data And Extract Interactive Insights In Python
A practical guide to topic mining and interactive visualizations
Stars: ✭ 61 (-7.58%)
Mutual labels:  natural-language-processing
Gpt2
PyTorch Implementation of OpenAI GPT-2
Stars: ✭ 64 (-3.03%)
Mutual labels:  natural-language-processing
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (-9.09%)
Mutual labels:  natural-language-processing
Language Models
Build unigram and bigram language models, implement Laplace smoothing and use the models to compute the perplexity of test corpora.
Stars: ✭ 59 (-10.61%)
Mutual labels:  natural-language-processing
Emailparser
remove signature blocks from emails
Stars: ✭ 63 (-4.55%)
Mutual labels:  natural-language-processing
Nlg Rl
Accelerated Reinforcement Learning for Sentence Generation by Vocabulary Prediction
Stars: ✭ 59 (-10.61%)
Mutual labels:  natural-language-processing
Kor2vec
Library for Korean morpheme and word vector representation
Stars: ✭ 64 (-3.03%)
Mutual labels:  natural-language-processing
Teapot Nlp
Tool for Evaluating Adversarial Perturbations on Text
Stars: ✭ 58 (-12.12%)
Mutual labels:  natural-language-processing
Emnlp2018 nli
Repository for NLI models (EMNLP 2018)
Stars: ✭ 62 (-6.06%)
Mutual labels:  natural-language-processing
Text Analytics With Python
Learn how to process, classify, cluster, summarize, understand syntax, semantics and sentiment of text data with the power of Python! This repository contains code and datasets used in my book, "Text Analytics with Python" published by Apress/Springer.
Stars: ✭ 1,132 (+1615.15%)
Mutual labels:  natural-language-processing
Chicksexer
A Python package for gender classification.
Stars: ✭ 64 (-3.03%)
Mutual labels:  natural-language-processing
Languagetoys
Random fun with statistical language models.
Stars: ✭ 63 (-4.55%)
Mutual labels:  natural-language-processing

CapsNet for Natural Language Processing

A capsule is a group of neurons whose activity vector represents the instantiation parameters of a specific type of entity such as an object or an object part.

This repository shows how to use a CapsNet architecture for Natural Language Prcoessing tasks like sentiment analysis.

Capsules are introduced by Geoffrey Hinton. We use a CapsNet implementation from 苏剑林 as git submodule. The implementation can be found here.

Related work

Here are some papers where capsules and the CapsNet architecture are introduced:

Paper Authors Link
Dynamic Routing Between Capsules Sara Sabour, Nicholas Frosst, Geoffrey E Hinton here
Matrix capsules with EM routing Geoffrey E Hinton et al. here
Transforming Auto-encoders Geoffrey E. HintonAlex Krizhevsky, Sida D. Wang here

Submodules

The CapsNet implementation is included via git submodule. So the first step after cloning this repository is to initialize the git submodules. This can be done via:

git submodule update --init --recursive

IMDB

We use the IMDB dataset for sentiment analysis with CapsNet. We use a bidirectional GRU before the capsnet layer.

The training can be started with:

python3 main.py

It takes several minutes per epoch. It is highly recommended to use a GPU for training. All experiments are done with a GTX 1060 (6GB).

Results

The following experiments are done on IMDB dataset:

  • Model a): we use a bidirectional GRU with a hidden size of 256. Number of capsule is set to 10. Number of routings is set to 3.
Model Best accuracy
a 88,98 %

Requirements

A recent version of Keras, TensorFlow and h5py is needed. Only Python 3.x is currently supported.

Contact (Bugs, Feedback, Contribution and more)

For questions about the capsnet-nlp repository, please open an issue here. If you want to contribute to the project please refer to the Contributing guide!

License

To respect the Free Software Movement and the enormous work of Dr. Richard Stallman the software in this repository is released under the GNU Affero General Public License in version 3. More information can be found here and in COPYING.

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