Chapter 5: Training Sequence Labeling Models
In this book, we have so far covered a number of features and models Flair offers right out of the box. The set of pre-trained sequence taggers, embeddings, and other models at first seems large enough for us to never need anything more than what's already available in Flair. But chances are, if you work with natural language processing (NLP) for long enough, you will encounter a problem that isn't generic enough to be solved by pre-trained models. When faced with such a problem, we usually need to train our own. This process involves acquiring training data, preprocessing it, possibly hand-labeling it, and finally, working with an NLP framework to train the model. But because Flair ships a wide selection of labeled corpora, chances are that you will only ever need to perform the last step, model training – the main focus of this chapter.
We will start this chapter by explaining when and why training custom models is...