All Projects → bfelbo → Deepmoji

bfelbo / Deepmoji

Licence: mit
State-of-the-art deep learning model for analyzing sentiment, emotion, sarcasm etc.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deepmoji

Absa Pytorch
Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
Stars: ✭ 1,181 (-2.8%)
Mutual labels:  natural-language-processing
Hunspell
The most popular spellchecking library.
Stars: ✭ 1,196 (-1.56%)
Mutual labels:  natural-language-processing
Abigsurvey
A collection of 500+ survey papers on Natural Language Processing (NLP) and Machine Learning (ML)
Stars: ✭ 1,203 (-0.99%)
Mutual labels:  natural-language-processing
Python nlp tutorial
This repository provides everything to get started with Python for Text Mining / Natural Language Processing (NLP)
Stars: ✭ 72 (-94.07%)
Mutual labels:  natural-language-processing
Stminsights
A Shiny Application for Inspecting Structural Topic Models
Stars: ✭ 74 (-93.91%)
Mutual labels:  natural-language-processing
Awesome Bert Japanese
📝 A list of pre-trained BERT models for Japanese with word/subword tokenization + vocabulary construction algorithm information
Stars: ✭ 76 (-93.74%)
Mutual labels:  natural-language-processing
Man
Multinomial Adversarial Networks for Multi-Domain Text Classification (NAACL 2018)
Stars: ✭ 72 (-94.07%)
Mutual labels:  natural-language-processing
Text Dependency Parser
🏄 依存关系分析,NLP,自然语言处理
Stars: ✭ 78 (-93.58%)
Mutual labels:  natural-language-processing
Nlp Tutorial
Natural Language Processing Tutorial for Deep Learning Researchers
Stars: ✭ 9,895 (+714.4%)
Mutual labels:  natural-language-processing
Dialogue Understanding
This repository contains PyTorch implementation for the baseline models from the paper Utterance-level Dialogue Understanding: An Empirical Study
Stars: ✭ 77 (-93.66%)
Mutual labels:  natural-language-processing
Senta
Baidu's open-source Sentiment Analysis System.
Stars: ✭ 1,187 (-2.3%)
Mutual labels:  natural-language-processing
Course Computational Literary Analysis
Course materials for Introduction to Computational Literary Analysis, taught at UC Berkeley in Summer 2018, 2019, and 2020, and at Columbia University in Fall 2020.
Stars: ✭ 74 (-93.91%)
Mutual labels:  natural-language-processing
Nested Ner Tacl2020 Transformers
Implementation of Nested Named Entity Recognition using BERT
Stars: ✭ 76 (-93.74%)
Mutual labels:  natural-language-processing
Sense2vec
🦆 Contextually-keyed word vectors
Stars: ✭ 1,184 (-2.55%)
Mutual labels:  natural-language-processing
Multimodal Toolkit
Multimodal model for text and tabular data with HuggingFace transformers as building block for text data
Stars: ✭ 78 (-93.58%)
Mutual labels:  natural-language-processing
Mt Dnn
Multi-Task Deep Neural Networks for Natural Language Understanding
Stars: ✭ 72 (-94.07%)
Mutual labels:  natural-language-processing
Rutermextract
Term extraction for Russian language
Stars: ✭ 75 (-93.83%)
Mutual labels:  natural-language-processing
Practical 3
Oxford Deep NLP 2017 course - Practical 3: Text Classification with RNNs
Stars: ✭ 78 (-93.58%)
Mutual labels:  natural-language-processing
Chinese Xlnet
Pre-Trained Chinese XLNet(中文XLNet预训练模型)
Stars: ✭ 1,213 (-0.16%)
Mutual labels:  natural-language-processing
Monkeylearn Ruby
Official Ruby client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Ruby apps.
Stars: ✭ 76 (-93.74%)
Mutual labels:  natural-language-processing

------ Update September 2018 ------

It's now been a year since DeepMoji was released and we're trying to understand how it's being used such that we can make improvements and provide you with better models in the future.

Please help us achieve this by answering our 4-question Google Form. Thanks for your support!

DeepMoji

DeepMoji Youtube
(click image for video demonstration)

DeepMoji is a model trained on 1.2 billion tweets with emojis to understand how language is used to express emotions. Through transfer learning the model can obtain state-of-the-art performance on many emotion-related text modeling tasks.

Try our online demo at http://deepmoji.mit.edu! See the paper, blog post or FAQ for more details.

Overview

  • deepmoji/ contains all the underlying code needed to convert a dataset to our vocabulary and use our model.
  • examples/ contains short code snippets showing how to convert a dataset to our vocabulary, load up the model and run it on that dataset.
  • scripts/ contains code for processing and analysing datasets to reproduce results in the paper.
  • model/ contains the pretrained model and vocabulary.
  • data/ contains raw and processed datasets that we include in this repository for testing.
  • tests/ contains unit tests for the codebase.

To start out with, have a look inside the examples/ directory. See score_texts_emojis.py for how to use DeepMoji to extract emoji predictions, encode_texts.py for how to convert text into 2304-dimensional emotional feature vectors or finetune_youtube_last.py for how to use the model for transfer learning on a new dataset.

Please consider citing our paper if you use our model or code (see below for citation).

Frameworks

This code is based on Keras, which requires either Theano or Tensorflow as the backend. If you would rather use pyTorch there's an implementation available here, which has kindly been provided by Thomas Wolf.

Installation

We assume that you're using Python 2.7 with pip installed. As a backend you need to install either Theano (version 0.9+) or Tensorflow (version 1.3+). Once that's done you need to run the following inside the root directory to install the remaining dependencies:

pip install -e .

This will install the following dependencies:

Ensure that Keras uses your chosen backend. You can find the instructions here, under the Switching from one backend to another section.

Run the included script, which downloads the pretrained DeepMoji weights (~85MB) from here and places them in the model/ directory:

python scripts/download_weights.py

Testing

To run the tests, install nose. After installing, navigate to the tests/ directory and run:

nosetests -v

By default, this will also run finetuning tests. These tests train the model for one epoch and then check the resulting accuracy, which may take several minutes to finish. If you'd prefer to exclude those, run the following instead:

nosetests -v -a '!slow'

Disclaimer

This code has been tested to work with Python 2.7 on an Ubuntu 16.04 machine. It has not been optimized for efficiency, but should be fast enough for most purposes. We do not give any guarantees that there are no bugs - use the code on your own responsibility!

Contributions

We welcome pull requests if you feel like something could be improved. You can also greatly help us by telling us how you felt when writing your most recent tweets. Just click here to contribute.

License

This code and the pretrained model is licensed under the MIT license.

Benchmark datasets

The benchmark datasets are uploaded to this repository for convenience purposes only. They were not released by us and we do not claim any rights on them. Use the datasets at your responsibility and make sure you fulfill the licenses that they were released with. If you use any of the benchmark datasets please consider citing the original authors.

Twitter dataset

We sadly cannot release our large Twitter dataset of tweets with emojis due to licensing restrictions.

Citation

@inproceedings{felbo2017,
  title={Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm},
  author={Felbo, Bjarke and Mislove, Alan and S{\o}gaard, Anders and Rahwan, Iyad and Lehmann, Sune},
  booktitle={Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year={2017}
}
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].