Build Text Summarizer in Python

share link

by kandikits dot icon Updated: Oct 20, 2022

technology logo
technology logo

1-Click Kit 1-Click Kit  


NLP text summarizer, is a Python package that summarizes texts and extracts the most important sentences from a given text. Text summarizer is commonly used in news feeding websites to summarize long articles. Summarizer shortens long texts such that the summarized text preserves all the essential points of the actual text. It uses spaCy, nltk, and NumPy to do the job. This solution is also used to summarize texts (in Extractive and abstractive techniques), extract key sentences and find their TF-IDF values. You can use this package for your own projects; we are sure you'll find it useful!


Extraction-based summarization involves selecting sentences from an original document and organizing them into a cohesive summary. In contrast to extraction-based summarization, abstraction-based summaries are created by using algorithms to produce abstracts that can be used as templates.


spaCy is a library for Natural Language Processing (NLP). It provides functions for tokenization, part of speech tagging, and parsing. The library also includes pre-trained models for some languages. NLTK (Natural Language Toolkit) is another popular toolkit for NLP tasks. It is used in many research papers to solve different problems related to NLP.

Deployment Information

Please find the kit solution in this group.

  1. Download, extract and double-click the kit installer file to install the kit.
  2. After the successful installation of the kit, press 'Y' to run the kit.
  3. To run the kit manually, press 'N' and locate the zip file 'Text_Summarizer.zip'
  4. Extract the zip file and navigate to the directory 'bert-extractive-summarizer-master'
  5. Open command prompt in the extracted directory 'bert-extractive-summarizer-master' and run the command 'jupyter notebook'
  6. Locate and open the 'Text_Summarizer.ipynb' notebook from the Jupyter Notebook browser window.
  7. Execute cells in the notebook


Click on the button below to download the solution and follow the deployment instructions to begin set-up. This 1-click kit has all the required dependencies and resources you may need to build your Text Summarizer in Python.

For a detailed tutorial on installing & executing the solution as well as learning resources including training & certification opportunities, please visit the OpenWeaver Community

Development Environment

VSCode and Jupyter Notebook are used for development and debugging. Jupyter Notebook is a web based interactive environment often used for experiments, whereas VSCode is used to get a typical experience of IDE for developers.

notebookby jupyter

Jupyter Notebook doticonstar image 10204 doticonVersion:v7.0.0b4doticon
License: Permissive (BSD-3-Clause)

Jupyter Interactive Notebook

Support
    Quality
      Security
        License
          Reuse

            notebookby jupyter

            Jupyter Notebook doticon star image 10204 doticonVersion:v7.0.0b4doticon License: Permissive (BSD-3-Clause)

            Jupyter Interactive Notebook
            Support
              Quality
                Security
                  License
                    Reuse

                      vscodeby microsoft

                      TypeScript doticonstar image 147328 doticonVersion:1.79.2doticon
                      License: Permissive (MIT)

                      Visual Studio Code

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                vscodeby microsoft

                                TypeScript doticon star image 147328 doticonVersion:1.79.2doticon License: Permissive (MIT)

                                Visual Studio Code
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          Exploratory Data Analysis

                                          For extensive analysis and exploration of data, and to deal with arrays, these libraries are used. They are also used for performing scientific computation and data manipulation.

                                          numpyby numpy

                                          Python doticonstar image 23755 doticonVersion:v1.25.0rc1doticon
                                          License: Permissive (BSD-3-Clause)

                                          The fundamental package for scientific computing with Python.

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    numpyby numpy

                                                    Python doticon star image 23755 doticonVersion:v1.25.0rc1doticon License: Permissive (BSD-3-Clause)

                                                    The fundamental package for scientific computing with Python.
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              pandasby pandas-dev

                                                              Python doticonstar image 38689 doticonVersion:v2.0.2doticon
                                                              License: Permissive (BSD-3-Clause)

                                                              Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        pandasby pandas-dev

                                                                        Python doticon star image 38689 doticonVersion:v2.0.2doticon License: Permissive (BSD-3-Clause)

                                                                        Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  Text Mining

                                                                                  Libraries in this group are used for analysis and processing of unstructured natural language.

                                                                                  spaCyby explosion

                                                                                  Python doticonstar image 26383 doticonVersion:v3.2.6doticon
                                                                                  License: Permissive (MIT)

                                                                                  💫 Industrial-strength Natural Language Processing (NLP) in Python

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            spaCyby explosion

                                                                                            Python doticon star image 26383 doticonVersion:v3.2.6doticon License: Permissive (MIT)

                                                                                            💫 Industrial-strength Natural Language Processing (NLP) in Python
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      sentencepieceby google

                                                                                                      C++ doticonstar image 7616 doticonVersion:v0.1.99doticon
                                                                                                      License: Permissive (Apache-2.0)

                                                                                                      Unsupervised text tokenizer for Neural Network-based text generation.

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                sentencepieceby google

                                                                                                                C++ doticon star image 7616 doticonVersion:v0.1.99doticon License: Permissive (Apache-2.0)

                                                                                                                Unsupervised text tokenizer for Neural Network-based text generation.
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          nltkby nltk

                                                                                                                          Python doticonstar image 12020 doticonVersion:Currentdoticon
                                                                                                                          License: Permissive (Apache-2.0)

                                                                                                                          NLTK Source

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    nltkby nltk

                                                                                                                                    Python doticon star image 12020 doticonVersion:Currentdoticon License: Permissive (Apache-2.0)

                                                                                                                                    NLTK Source
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              Machine Learning & Natural Language Processing

                                                                                                                                              The library offers state-of-the-art pre-trained models for Natural Language Processing (NLP).

                                                                                                                                              scikit-learnby scikit-learn

                                                                                                                                              Python doticonstar image 54584 doticonVersion:1.2.2doticon
                                                                                                                                              License: Permissive (BSD-3-Clause)

                                                                                                                                              scikit-learn: machine learning in Python

                                                                                                                                              Support
                                                                                                                                                Quality
                                                                                                                                                  Security
                                                                                                                                                    License
                                                                                                                                                      Reuse

                                                                                                                                                        scikit-learnby scikit-learn

                                                                                                                                                        Python doticon star image 54584 doticonVersion:1.2.2doticon License: Permissive (BSD-3-Clause)

                                                                                                                                                        scikit-learn: machine learning in Python
                                                                                                                                                        Support
                                                                                                                                                          Quality
                                                                                                                                                            Security
                                                                                                                                                              License
                                                                                                                                                                Reuse

                                                                                                                                                                  pytorchby pytorch

                                                                                                                                                                  Python doticonstar image 67874 doticonVersion:v2.0.1doticon
                                                                                                                                                                  License: Others (Non-SPDX)

                                                                                                                                                                  Tensors and Dynamic neural networks in Python with strong GPU acceleration

                                                                                                                                                                  Support
                                                                                                                                                                    Quality
                                                                                                                                                                      Security
                                                                                                                                                                        License
                                                                                                                                                                          Reuse

                                                                                                                                                                            pytorchby pytorch

                                                                                                                                                                            Python doticon star image 67874 doticonVersion:v2.0.1doticon License: Others (Non-SPDX)

                                                                                                                                                                            Tensors and Dynamic neural networks in Python with strong GPU acceleration
                                                                                                                                                                            Support
                                                                                                                                                                              Quality
                                                                                                                                                                                Security
                                                                                                                                                                                  License
                                                                                                                                                                                    Reuse

                                                                                                                                                                                      transformersby huggingface

                                                                                                                                                                                      Python doticonstar image 104111 doticonVersion:v4.30.2doticon
                                                                                                                                                                                      License: Permissive (Apache-2.0)

                                                                                                                                                                                      🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.

                                                                                                                                                                                      Support
                                                                                                                                                                                        Quality
                                                                                                                                                                                          Security
                                                                                                                                                                                            License
                                                                                                                                                                                              Reuse

                                                                                                                                                                                                transformersby huggingface

                                                                                                                                                                                                Python doticon star image 104111 doticonVersion:v4.30.2doticon License: Permissive (Apache-2.0)

                                                                                                                                                                                                🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
                                                                                                                                                                                                Support
                                                                                                                                                                                                  Quality
                                                                                                                                                                                                    Security
                                                                                                                                                                                                      License
                                                                                                                                                                                                        Reuse
                                                                                                                                                                                                          Python doticonstar image 10938 doticonVersion:v2.2.2doticon
                                                                                                                                                                                                          License: Permissive (Apache-2.0)

                                                                                                                                                                                                          Multilingual Sentence & Image Embeddings with BERT

                                                                                                                                                                                                          Support
                                                                                                                                                                                                            Quality
                                                                                                                                                                                                              Security
                                                                                                                                                                                                                License
                                                                                                                                                                                                                  Reuse

                                                                                                                                                                                                                    sentence-transformersby UKPLab

                                                                                                                                                                                                                    Python doticon star image 10938 doticonVersion:v2.2.2doticon License: Permissive (Apache-2.0)

                                                                                                                                                                                                                    Multilingual Sentence & Image Embeddings with BERT
                                                                                                                                                                                                                    Support
                                                                                                                                                                                                                      Quality
                                                                                                                                                                                                                        Security
                                                                                                                                                                                                                          License
                                                                                                                                                                                                                            Reuse

                                                                                                                                                                                                                              Utilities

                                                                                                                                                                                                                              library tqdm can be used to show progress bar for any long running process step in the code

                                                                                                                                                                                                                              tqdmby tqdm

                                                                                                                                                                                                                              Python doticonstar image 25025 doticonVersion:v4.65.0doticon
                                                                                                                                                                                                                              License: Others (Non-SPDX)

                                                                                                                                                                                                                              A Fast, Extensible Progress Bar for Python and CLI

                                                                                                                                                                                                                              Support
                                                                                                                                                                                                                                Quality
                                                                                                                                                                                                                                  Security
                                                                                                                                                                                                                                    License
                                                                                                                                                                                                                                      Reuse

                                                                                                                                                                                                                                        tqdmby tqdm

                                                                                                                                                                                                                                        Python doticon star image 25025 doticonVersion:v4.65.0doticon License: Others (Non-SPDX)

                                                                                                                                                                                                                                        A Fast, Extensible Progress Bar for Python and CLI
                                                                                                                                                                                                                                        Support
                                                                                                                                                                                                                                          Quality
                                                                                                                                                                                                                                            Security
                                                                                                                                                                                                                                              License
                                                                                                                                                                                                                                                Reuse

                                                                                                                                                                                                                                                  Testing

                                                                                                                                                                                                                                                  The libraries listed here can be used for unit testing as well as integration testing

                                                                                                                                                                                                                                                  pytestby pytest-dev

                                                                                                                                                                                                                                                  Python doticonstar image 10300 doticonVersion:7.3.2doticon
                                                                                                                                                                                                                                                  License: Permissive (MIT)

                                                                                                                                                                                                                                                  The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

                                                                                                                                                                                                                                                  Support
                                                                                                                                                                                                                                                    Quality
                                                                                                                                                                                                                                                      Security
                                                                                                                                                                                                                                                        License
                                                                                                                                                                                                                                                          Reuse

                                                                                                                                                                                                                                                            pytestby pytest-dev

                                                                                                                                                                                                                                                            Python doticon star image 10300 doticonVersion:7.3.2doticon License: Permissive (MIT)

                                                                                                                                                                                                                                                            The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
                                                                                                                                                                                                                                                            Support
                                                                                                                                                                                                                                                              Quality
                                                                                                                                                                                                                                                                Security
                                                                                                                                                                                                                                                                  License
                                                                                                                                                                                                                                                                    Reuse

                                                                                                                                                                                                                                                                      Kit Solution Source

                                                                                                                                                                                                                                                                      Python doticonstar image 1206 doticonVersion:0.10.1doticon
                                                                                                                                                                                                                                                                      License: Permissive (MIT)

                                                                                                                                                                                                                                                                      Easy to use extractive text summarization with BERT

                                                                                                                                                                                                                                                                      Support
                                                                                                                                                                                                                                                                        Quality
                                                                                                                                                                                                                                                                          Security
                                                                                                                                                                                                                                                                            License
                                                                                                                                                                                                                                                                              Reuse

                                                                                                                                                                                                                                                                                bert-extractive-summarizerby dmmiller612

                                                                                                                                                                                                                                                                                Python doticon star image 1206 doticonVersion:0.10.1doticon License: Permissive (MIT)

                                                                                                                                                                                                                                                                                Easy to use extractive text summarization with BERT
                                                                                                                                                                                                                                                                                Support
                                                                                                                                                                                                                                                                                  Quality
                                                                                                                                                                                                                                                                                    Security
                                                                                                                                                                                                                                                                                      License
                                                                                                                                                                                                                                                                                        Reuse

                                                                                                                                                                                                                                                                                          Support

                                                                                                                                                                                                                                                                                          If you need help using this kit, you may reach us at the OpenWeaver Community.