What this book covers
Chapter 1, Introduction to Flair, provides a quick overview of NLP and its basic problems and techniques. The chapter then introduces Flair and shows how to set up your local environment.
Chapter 2, Flair Base Types, introduces Flair's basic syntax, its typical classes, and methods.
Chapter 3, Embeddings in Flair, explains the concept behind word and document embeddings and their role in NLP. It describes all the different types of embeddings available in Flair.
Chapter 4, Sequence Tagging, describes sequence tagging and its subtypes, such as named entity recognition and part-of-speech tagging. This chapter also demonstrates how to use pre-trained sequence taggers in Flair.
Chapter 5, Training Sequence Labeling Models, explains how to train, save, and use custom sequence tagging models in Flair.
Chapter 6, Hyperparameter Optimization in Flair, shows the importance of using the right hyperparameters for model training. It introduces hyperparameter optimization tools in Python and explains how to perform hyperparameter optimization in Flair.
Chapter 7, Train Your Own Embeddings, explains how to train custom embeddings in Flair and how to leverage different evaluation techniques for measuring success.
Chapter 8, Text Classification in Flair, introduces the problem of text classification. This chapter demonstrates how to use pre-trained models as well as how to train custom classifiers. It also introduces a novel approach to text classification called TARS.
Chapter 9, Deploying and Using Models in Production, talks about the challenges of deploying and using NLP models in production. This chapter demonstrates how to set up custom minimum viable product NLP services and how to host Flair models on the Hugging Face models hub.
Chapter 10, Hands-On Exercise – Building a Trading Bot with Flair, solves a real-world problem as part of a hands-on exercise by building a trading bot with Flair.