A tool to automatically generate pseudo-code from source code.
Python Shell
Latest commit d771954 Nov 12, 2015 @delihiros modify README
Permalink
Failed to load latest commit information.
scripts initial commit Oct 22, 2015
.gitignore initial commit Oct 22, 2015
README.md modify README Nov 12, 2015
run-pseudogen.sh fix bugs Nov 11, 2015
test-pseudogen.sh initial commit Oct 22, 2015
tool_setup.sh modify README and setup script Oct 26, 2015
train-pseudogen.sh fix bugs Nov 11, 2015

README.md

Pseudogen

A tool to automatically generate pseudo-code from source code.

Demo

Installation

Requirements

  $ sudo apt-get install git libboost-all-dev autoconf automake autotools-dev libtool
  $ pip install nltk

for Mac OS X users: GIZA++ is written for Linux, so you may need to do some modifications to install. http://catherinegasnier.blogspot.jp/2014/04/install-giza-107-on-mac-osx-1092.html

  $ git clone https://github.com/delihiros/pseudogen.git
  $ cd pseudogen
  $ ./tool_setup.sh

Usage

Download and extract corpus from annotated Django source code.

  $ mkdir data
  $ cd data
  $ wget -O- http://ahclab.naist.jp/pseudogen/en-django.tar.gz | tar zxvf -
  $ mv en-django/all.* .
  $ ./../train-pseudogen.sh -p all.code -e all.anno
  $ ./../run-pseudogen.sh -f tune/travatar.ini
  $ # input Python code you want to translate

How does Pseudogen work?

Papers

Architecture

Tools Used

  • GIZA++ to make alignment
  • Travatar to train Tree-to-String machine translation model
  • mteval to evaluate

Contributors