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
Natural Language Processing: Python and NLTK

You're reading from   Natural Language Processing: Python and NLTK Learn to build expert NLP and machine learning projects using NLTK and other Python libraries

Arrow left icon
Product type Course
Published in Nov 2016
Publisher Packt
ISBN-13 9781787285101
Length 702 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (5):
Arrow left icon
Iti Mathur Iti Mathur
Author Profile Icon Iti Mathur
Iti Mathur
Jacob Perkins Jacob Perkins
Author Profile Icon Jacob Perkins
Jacob Perkins
Deepti Chopra Deepti Chopra
Author Profile Icon Deepti Chopra
Deepti Chopra
Nitin Hardeniya Nitin Hardeniya
Author Profile Icon Nitin Hardeniya
Nitin Hardeniya
Nisheeth Joshi Nisheeth Joshi
Author Profile Icon Nisheeth Joshi
Nisheeth Joshi
+1 more Show less
Arrow right icon
View More author details
Toc

Chapter 7. Text Classification

In this chapter, we will cover the following recipes:

  • Bag of words feature extraction
  • Training a Naive Bayes classifier
  • Training a decision tree classifier
  • Training a maximum entropy classifier
  • Training scikit-learn classifiers
  • Measuring precision and recall of a classifier
  • Calculating high information words
  • Combining classifiers with voting
  • Classifying with multiple binary classifiers
  • Training a classifier with NLTK-Trainer

Introduction

Text classification is a way to categorize documents or pieces of text. By examining the word usage in a piece of text, classifiers can decide what class label to assign to it. A binary classifier decides between two labels, such as positive or negative. The text can either be one label or another, but not both, whereas a multi-label classifier can assign one or more labels to a piece of text.

Classification works by learning from labeled feature sets, or training data, to later classify an unlabeled feature set. A labeled...

You have been reading a chapter from
Natural Language Processing: Python and NLTK
Published in: Nov 2016
Publisher: Packt
ISBN-13: 9781787285101
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