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...