Skip to main content

Text classification and sentiment analysis

  • Chapter
  • First Online:
Practical Machine Learning in JavaScript


In the previous chapter, we focused on using image data to learn more about machine learning and build an image classifier. In this chapter, we are going to talk about using text data, cover a few concepts of natural language processing, and build a few experiments around sentiment analysis.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations


Rights and permissions

Reprints and permissions

Copyright information

© 2021 Charlie Gerard

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Gerard, C. (2021). Text classification and sentiment analysis. In: Practical Machine Learning in JavaScript. Apress, Berkeley, CA.

Download citation

Publish with us

Policies and ethics