GluonNLP: NLP made easy¶
Get Started: A Quick Example¶
Here is a quick example that downloads and creates a word embedding model and then computes the cosine similarity between two words.
(You can click the play button below to run this example.)
Model Zoo¶
Mapping words to vectors.
Learning the distribution and representation of sequences of words.
From “Hello” to “Bonjour”.
Categorize texts and documents.
Classifying polarity of emotions and opinions.
Dependency parsing.
Determine if the premise semantically entails the hypothesis.
Generating language from models.
Transfer pre-trained language representations to language understanding tasks.
And more in tutorials.
Installation¶
GluonNLP relies on the recent version of MXNet. The easiest way to install MXNet is through pip. The following command installs the latest version of MXNet.
pip install --upgrade mxnet>=1.3.0
Note
There are other pre-build MXNet packages that enable GPU supports and accelerate CPU performance, please refer to this tutorial for details. Some training scripts are recommended to run on GPUs, if you don’t have a GPU machine at hands, you may consider running on AWS.
After installing MXNet, you can install the GluonNLP toolkit by
pip install gluonnlp
About GluonNLP¶
Hint
You can find our the doc for our master development branch here.
GluonNLP provides implementations of the state-of-the-art (SOTA) deep learning models in NLP, and build blocks for text data pipelines and models. It is designed for engineers, researchers, and students to fast prototype research ideas and products based on these models. This toolkit offers four main features:
- Training scripts to reproduce SOTA results reported in research papers.
- Pre-trained models for common NLP tasks.
- Carefully designed APIs that greatly reduce the implementation complexity.
- Tutorials to help get started on new NLP tasks.
- Community support.
This toolkit assumes that users have basic knowledge about deep learning and NLP. Otherwise, please refer to an introduction course such as Deep Learning—The Straight Dope or Stanford CS224n.