Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Latest commit

 

History

History
15 lines (9 loc) · 814 Bytes

File metadata and controls

15 lines (9 loc) · 814 Bytes

A Convolutional Attention Network for Extreme Summarization of Source Code

Implementation of A Convolutional Attention Network for Extreme Summarization of Source Code in PyTorch using TorchText

Using Python 3.6, PyTorch 0.4 and TorchText 0.2.3.

Note: only the Convolutional Attention Model currently works, the Copy Convolutional Attention Model is in progress.

To use:

  1. download.sh to grab the dataset
  2. python preprocess.py to preprocess the dataset into json format
  3. python run_conv.py to run the Convolutional Attention Model with default parameters

Use python run_conv.py -h to see all the parameters that can be changed, e.g. to run the model on a different Java project within the dataset, use: python run_conv.py --project {project name}.