This repository contains a modular, configurable implementation of the abstractive text summarization framework presented in the paper: "Text summarization based on semantic graphs: an abstract meaning representation graph-to-text deep learning approach" (Kouris et al., 2024).
The project provides a pipeline for generating abstractive summaries by first parsing text into Abstract Meaning Representation (AMR) graphs, and then using a deep learning model to generate a summary directly from this semantic representation.
(Example of a styled AMR graph generated by this project)
Project Structure
The framework is organized into a modular structure for clarity and extensibility:
Features
Multiple Models: Implements several models from the paper: AS2SP, TRCE, PETR, and an RL training scheme.
Configurable Pipeline: Easily switch between models, data schemes, and hyperparameters via a central config file.
All Data Schemes: Supports all graph construction (sequence, combination) and transformation (OAMR, OAMRWS, SAMR, SAMRWS) methods described in the paper.
Modular and Extensible: The clean structure makes it easy to add new models, datasets, or evaluation metrics.
Setup and Installation
1. Clone the Repository
2. Environment and Dependencies
A Conda environment is recommended.
3. System-level Dependencies
The graphviz library requires a system-level installation.
Ubuntu/Debian: sudo apt-get update && sudo apt-get install graphviz -y
macOS (Homebrew): brew install graphviz
4. Download AMR Parser Model
Download the pre-trained AMR parsing model (modelparsexfmbartlarge-v010.tar.gz) and place it in the project root. Then, extract it.
5. Configure Paths
Open config/config.py and ensure all paths (e.g., DATAPATH, MODELPATH) are correctly set for your system.
How to Run
Use the main entry point main.py to either train a model or generate a summary.
Training
To train a model, specify the train mode. You can override any setting from the config file using command-line arguments.
The script will use the settings in config/config.py to load the correct data, build the model, and start the training process.
Generation
To generate a summary with a trained model, specify the generate mode. You must provide the input text and the path to your saved model.
License
This project is licensed under the MIT License.