万本电子书0元读

万本电子书0元读

顶部广告

fastText Quick Start Guide电子书

售       价:¥

6人正在读 | 0人评论 6.2

作       者:Joydeep Bhattacharjee

出  版  社:Packt Publishing

出版时间:2018-07-26

字       数:22.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Perform efficient fast text representation and classification with Facebook's fastText library 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 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 Who this book is for This book is for data analysts, data scientists, and machine learning developers who want to perform efficient word representation and sentence classification using Facebook's fastText library. Basic knowledge of Python programming is required.
目录展开

Title Page

Copyright and Credits

fastText Quick Start Guide

Dedication

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

First Steps

Introducing FastText

Introducing fastText

Installing fastText

Prerequisites

Windows

Linux

Installing dependencies on RHEL machines supporting the yum package manager

Installing dependencies on Debian-based machines such as Ubuntu

Installing dependencies on Arch Linux using pacman

Installing dependencies on Mac systems

Installing Python dependencies

Installing fastText on Windows

Installing fastText in Linux and macOS

Using a Docker image for fastText

Summary

Creating Models Using FastText Command Line

Text classification using fastText

Text preprocessing

English text and text using other Roman alphabets

Downloading the data

Preprocessing the Yelp data

Text normalization

Removing stop words

Normalizing

Shuffling all the data

Dividing into training and validation

Model building

Model training

Model testing and evaluation

Precision and recall

Confusion matrix

Hyperparameters

Epoch

Learning rate

N-grams

Start with pretrained word vectors

Finding the best fastText hyperparameters

Model quantization

Understanding the model

FastText word vectors

Creating word vectors

Downloading from Wikipedia

Text normalization

Create word vectors

Model evaluation

Nearest neighbors

Word analogies

Other parameters when training

Out of vocabulary words

Facebook word vectors

Using pretrained word vectors

Machine translation

Summary

The FastText Model

Word Representations in FastText

Word-to-vector representations

Types of word representations

Getting vector representations from text

One-hot encoding

Bag of words

TF-IDF

N-grams

Model architecture in fastText

The unsupervised model

Skipgram

Subword information skipgram

Implementing skipgram

CBOW

CBOW implementation

Comparison between skipgram and CBOW

Loss functions and optimization

Softmax

Hierarchical softmax

Negative sampling

Subsampling of frequent words

Context definitions

Summary

Sentence Classification in FastText

Sentence classification

fastText supervised learning

Architecture

Hierarchical softmax architecture

The n-gram features and the hashing trick

The FNV hash

Word embeddings and their use in sentence classification

fastText model quantization

Compression techniques

Quantization

Vector quantization

Finding the codebook for high-dimensional spaces

Product quantization

Additional steps

Summary

Using FastText in Your Own Models

FastText in Python

FastText official bindings

PyBind

Preprocessing data

Unsupervised learning

Training in fastText

Evaluating the model

Word vectors

Nearest neighbor queries

Word similarity

Model performance

Model visualization

Supervised learning

Data preprocessing and normalization

Training the model

Prediction

Testing the model

Confusion matrix

Gensim

Training a fastText model

Hyperparameters

Model saving and loading

Word vectors

Model Evaluation

Word Mover's Distance

Getting more out of the training process

Machine translation using Gensim

Summary

Machine Learning and Deep Learning Models

Scikit-learn and fastText

Custom classifiers for fastText

Bringing the whole thing together

Embeddings

Keras

Embedding layer in Keras

Convolutional neural networks

TensorFlow

Word embeddings in TensorFlow

RNN architectures

PyTorch

The torchtext library

Data classes in torchtext

Using the iterators

Bringing it all together

Summary

Deploying Models to Web and Mobile

Deploying to the web

Flask

The fastText functions

The flask endpoints

Deploying to smaller devices

Prerequisites – Completing the Google tutorial

App considerations

Adding the fastText model

FastText in Java

Adding the library dependencies to Android

Using library dependencies in Android

Finally the app

Summary

Notes for the Readers

Windows and Linux

Python 2 and Python 3

The fastText command line

The fastText supervised

The fastText skipgram

The fastText cbow

Gensim fastText parameters

References

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部