Tutorials

Interested in getting started in a new NLP area? Here are some tutorials to help get started.

Data Loading and Vocabularies

Data Loading APIs

Basics on how to load and process the sentiment dataset to form batches that can be processed efficiently.

Vocabulary APIs

Learn how to write simple code to create index for tokens.

Representation Learning

Using Pre-trained Word Embeddings

Basics on how to use word embedding with vocab in GluonNLP and apply it on word similarity and analogy problems.

Word Embeddings Training and Evaluation

Learn how to train fastText and word2vec embeddings on your own dataset, and determine embedding quality through intrinsic evaluation.

Extracting Sentence Features with Pre-trained ELMo

See how to use GluonNLP’s API to automatically download the pre-trained ELMo model, and extract features from it.

Fine-tuning Pre-trained BERT Models

See how to use GluonNLP to fine-tune a sentence pair classification model with pre-trained BERT parameters.

Language Modeling

LSTM-based Language Models

Learn what a language model is, what it can do, and how to train a word-level language model with truncated back-propagation-through-time (BPTT).

Machine Translation

Training GNMT on IWSLT 2015 Dataset

Learn how to train Google Neural Machine Translation, a seq2seq with attention model.

Using Pre-trained Transformer

Learn how to use a pre-trained transformer translation model for English-German translation.

Sentiment Analysis

Fine-tuning LSTM-based Language Model

See how to fine-tune a pre-trained language model to perform sentiment analysis on movie reviews.

Training Structured Self-attentive Sentence Embedding

See how to use GluonNLP to build more advanced model structure for extracting sentence embeddings to predict Yelp review rating.

Text Generation

Sequence Generation with Beam Search Sampler and Sequence Sampler

Learn how to generate sentence from pre-trained language model through sampling and beam search.