A tool to automatically generate pseudo-code from source code

栏目: IT技术 · 发布时间: 5年前

内容简介:A tool to automatically generate pseudo-code from source code.docker is all you need.

Pseudogen

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

Demo

Installation

Using Docker

docker is all you need.

docker attach `docker run -itd delihiros/pseudogen`
  /# cd pseudogen/data
  /# ../run-pseudogen.sh -f tune/travatar.ini

Requirements

Requires Python 3.5+

apt install git libboost-all-dev autoconf automake autotools-dev libtool zlib1g-dev cmake build-essential python3  python 3-pip wget -y
  pip3 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
  # in some environments, you may need to press Ctrl+D few times in order to start tranlating

How does Pseudogen work?

Papers

Tools Used

GIZA++
Travatar
mteval

Contributors


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

算法之美

算法之美

左飞 / 电子工业出版社 / 2016-3 / 79.00元

《算法之美——隐匿在数据结构背后的原理(C++版)》围绕算法与数据结构这个话题,循序渐进、深入浅出地介绍了现代计算机技术中常用的40 余个经典算法,以及回溯法、分治法、贪婪法和动态规划等算法设计思想。在此过程中,《算法之美——隐匿在数据结构背后的原理(C++版)》也系统地讲解了链表(包括单向链表、单向循环链表和双向循环链表)、栈、队列(包括普通队列和优先级队列)、树(包括二叉树、哈夫曼树、堆、红黑......一起来看看 《算法之美》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具