Srinivas-Natarajan / Abstractive-Summarizer

An abstractive summarization tool that can condense documents and web pages using Bidirectional Auto-Regressive Encoders for Transformer or BART for short. It is a desktop application with a UI constructed with python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abstractive-Summarization-using-BART

An abstractive summarization tool that can condense documents and web pages using Bidirectional Auto-Regressive Encoders for Transformer or BART for short. It is a desktop application with a UI constructed with python.

How to Run it

  1. Install required packages using thr requirements.txt

pip install -r requirements.txt

  1. Run Main.py

1. Architecture Diagram

Architecture Diagram

The system diagram starts with the methods of input with the standard techniques that involve typing out documents or uploading text files or documents from the user’s systems. If the users want to extract information from a webpage, the URL to the webpage is provided in a text field, and the request is sent to the Web Scraping module, which collects this information from the webpage and processes it to remove unnecessary details such as tags, links, and stopwords, etc. The Text summarization model takes this document which has been input and creates a bag of word models to collect only the vital information, which is then displayed to the User. The user is then allowed an option to encrypt the data using the ECIES algorithm, which generates a 256-bit symmetric key for the user with the ability to exchange this key with other users using the Diffie Hellman Key Exchange algorithm. This file can then be saved to the user’s system for future reference or shared with other authorized personnel.


2. Methodology

In the BERT architecture, the model has access to the entire sequence of tokens to predict the masked or missing tokens. While this may be useful for other NLP tasks such as predicting token positions, it is limited in summarization tasks. Summarization tasks, by their nature, limit the model to the tokens seen thus far. The argument that controls much information is available to the model is known as the attention mask.

BERT Mask

The GPT2 model is more suited for the prediction of the next masked token due to its use of the casual attention mask. This makes it suitable for prediction tasks but less effective at downstream tasks, such as situations where the whole input is required to give an output. In essence, GPT2 only uses words it has seen before.

GPT2 Mask

BART adopts a fully visible mask similar to BERT for its encoding process and a casual mask similar to the GPT2 model for the decoder process. The encoder and decoder are connected through cross attention, where every decoder layer performs attention over the encoder’s hidden states. This structure helps the overall output be closer to the input given.


3. Results

A. Rouge-1 Scores

Rouge1

B. Rouge-2 Scores

Rouge1

C. Rouge-L Scores

Rouge1

About

An abstractive summarization tool that can condense documents and web pages using Bidirectional Auto-Regressive Encoders for Transformer or BART for short. It is a desktop application with a UI constructed with python.


Languages

Language:Jupyter Notebook 72.4%Language:Python 26.6%Language:HTML 0.6%Language:CSS 0.3%Language:JavaScript 0.2%