▶Book Description
Facebook's fastText library handles text representation and classification, used for Natural Language Processing (NLP). Most organizations have to deal with enormous amounts of text data on a daily basis, and gaining efficient data insights requires powerful NLP tools such as fastText.
This book is your ideal introduction to fastText. You will learn how to create fastText models from the command line, without the need for complicated code. You will explore the algorithms that fastText is built on and how to use them for word representation and text classification.
Next, you will use fastText in conjunction with other popular libraries and frameworks such as Keras, TensorFlow, and PyTorch.
Finally, you will deploy fastText models to mobile devices. By the end of this book, you will have all the required knowledge to use fastText in your own applications at work or in projects.
▶What You Will Learn
⦁ Create models using the default command line options in fastText
⦁ Understand the algorithms used in fastText to create word vectors
⦁ Combine command line text transformation capabilities and the fastText library to implement a training, validation, and prediction pipeline
⦁ Explore word representation and sentence classification using fastText
⦁ Use Gensim and spaCy to load the vectors, transform, lemmatize, and perform other NLP tasks efficiently
⦁ Develop a fastText NLP classifier using popular frameworks, such as Keras, Tensorflow, and PyTorch
▶Key Features
⦁ Introduction to Facebook's fastText library for NLP
⦁ Perform efficient word representations, sentence classification, vector representation
⦁ Build better, more scalable solutions for text representation and classification
▶Who This Book Is For
This book will be of benefit to you if you are a software developer/machine learning engineer trying to understand the state-of-the-art in NLP. A large part of the book deals with real-life problems and considerations for creating an NLP pipeline. If you are an NLP researcher, there is a lot of value here because you will learn about the internal algorithms and considerations taken while developing the fastText software. All the code examples are written in Jupyter Notebooks. I highly recommend you type them out, change them, and tinker with them. Keep the code handy so that you can use it later in your actual projects.
▶What this book covers
⦁ Chapter 1, Introducing FastText, introduces fastText and the NLP context in which this library is useful. It will map the motivations behind building the library and the intended usage and benefits that the creators of the library intended to bring into NLP and the field of computational linguistics. There will also be specific instructions explaining how to install fastText on your work machine. Upon completion of this chapter, you will have fastText installed and running on your computer.
⦁ Chapter 2, Creating Models Using the FastText Command Line, discusses the rich command line that the fastText library provides. This chapter describes the default command-line options and shows how to use it to create models. If you are only interested in having a superficial introduction to fastText, reading up to this chapter should be enough.
⦁ Chapter 3, Word Representations in FastText, explains how unsupervised word embeddings are created in fastText.
⦁ Chapter 4, Sentence Classification in FastText, introduces the algorithms that power sentence classification in fastText. You will also learn how fastText compresses big models into smaller models that can be deployed to low-memory devices.
⦁ Chapter 5, FastText in Python, is about creating models in Python by either using the official Python bindings for fastText or by using the gensim library, which is a popular Python library for NLP.
⦁ Chapter 6, Machine Learning and Deep Learning Models, explains how to integrate fastText into your NLP pipeline if you have pre-built pipelines that use either statistical machine learning paradigms or deep learning paradigms. In the case of statistical machine learning, this chapter makes use of the scikit-learn library; and in the case of deep learning, Keras, TensorFlow, and PyTorch are taken into account.
⦁ Chapter 7, Deploying Models to Mobile and the Web, is mainly about deploymen and how to integrate fastText models in live production-grade customer applications.