Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning Techniques for Text

You're reading from   Machine Learning Techniques for Text Apply modern techniques with Python for text processing, dimensionality reduction, classification, and evaluation

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781803242385
Length 448 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Nikos Tsourakis Nikos Tsourakis
Author Profile Icon Nikos Tsourakis
Nikos Tsourakis
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chapter 1: Introducing Machine Learning for Text 2. Chapter 2: Detecting Spam Emails FREE CHAPTER 3. Chapter 3: Classifying Topics of Newsgroup Posts 4. Chapter 4: Extracting Sentiments from Product Reviews 5. Chapter 5: Recommending Music Titles 6. Chapter 6: Teaching Machines to Translate 7. Chapter 7: Summarizing Wikipedia Articles 8. Chapter 8: Detecting Hateful and Offensive Language 9. Chapter 9: Generating Text in Chatbots 10. Chapter 10: Clustering Speech-to-Text Transcriptions 11. Index 12. Other Books You May Enjoy

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The CountVectorizer class takes the token pattern argument as the input [a-zA-Z]+, which identifies words with lowercase or uppercase letters.”

A block of code is set as follows:

import numpy as np
from sklearn.model_selection import train_test_split
# Create the train and test sets.
X_train, X_test, y_train, y_test = train_test_split(data['tweet'], data['class'], test_size=0.1, stratify=data['class'], random_state=123)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

Epoch 7/15
628/628 [==============================] - 753s 1s/step - loss: 0.2343 - accuracy: 0.9388 - val_loss: 0.3681 - val_accuracy: 0.8991

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “For example, muscles can be transformed into mussels with a minimum of 3 substitutions.”

Tips or important notes

Appear like this.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image