Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Natural Language Processing Fundamentals

You're reading from   Natural Language Processing Fundamentals Build intelligent applications that can interpret the human language to deliver impactful results

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789954043
Length 374 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Dwight Gunning Dwight Gunning
Author Profile Icon Dwight Gunning
Dwight Gunning
Sohom Ghosh Sohom Ghosh
Author Profile Icon Sohom Ghosh
Sohom Ghosh
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introduction to Natural Language Processing FREE CHAPTER 2. Basic Feature Extraction Methods 3. Developing a Text classifier 4. Collecting Text Data from the Web 5. Topic Modeling 6. Text Summarization and Text Generation 7. Vector Representation 8. Sentiment Analysis Appendix

Summarizing Text Using Gensim

The Gensim NLP library actually contains a text summarizer. So, instead of writing your own text summarizer, you could actually use this already-available one in your project. As a bonus, Gensim is an excellent NLP library with many other features.

The text summarizer in Gensim is located in the gensim.summarization package. The main method, which is summarize, provides a number of options for returning the number of words, a percentage of the text, and more. The underlying implementation is the TextRank algorithm, which you are already familiar with. To get a better understanding of this concept, we will go through an activity in the next section.

Activity 11: Summarizing a Downloaded Page Using the Gensim Text Summarizer

Click is a Python project for creating beautiful command-line interfaces. In this activity, we will create a summary of the Why Click page. For this, we will make use of the Gensim Summarizer package. Follow these steps to implement...

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 ₹800/month. Cancel anytime