Book Image

fastText Quick Start Guide

By : Joydeep Bhattacharjee
Book Image

fastText Quick Start Guide

By: Joydeep Bhattacharjee

Overview of this book

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.
Table of Contents (14 chapters)
Free Chapter
1
First Steps
4
The FastText Model
7
Using FastText in Your Own Models

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 deployment and how to integrate fastText models in live production-grade customer applications.