https://github.com/sriniiyer/codenn
Summarizing Source Code using a Neural Attention Model - CODENN
https://github.com/sriniiyer/codenn
Last synced: 5 days ago
JSON representation
Summarizing Source Code using a Neural Attention Model - CODENN
- Host: GitHub
- URL: https://github.com/sriniiyer/codenn
- Owner: sriniiyer
- License: mit
- Created: 2016-06-06T22:01:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T21:04:53.000Z (almost 3 years ago)
- Last Synced: 2024-04-20T08:34:49.154Z (over 1 year ago)
- Language: Python
- Size: 16.8 MB
- Stars: 235
- Watchers: 11
- Forks: 73
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-machine-learning-on-source-code - Summarizing Source Code using a Neural Attention Model - CODE-NN, uses LSTM networks with attention to produce sentences that describe C# code snippets and SQL queries from StackOverflow. Torch over C#/SQL (Software)
- awesome-machine-learning-on-source-code - Summarizing Source Code using a Neural Attention Model - CODE-NN, uses LSTM networks with attention to produce sentences that describe C# code snippets and SQL queries from StackOverflow. Torch over C#/SQL (Software)
- awesome-machine-learning-on-source-code - Summarizing Source Code using a Neural Attention Model - CODE-NN, uses LSTM networks with attention to produce sentences that describe C# code snippets and SQL queries from StackOverflow. Torch over C#/SQL (Software)
README
**Run CODENN**
See details of CODENN in our paper
Summarizing Source Code using a Neural Attention Model (https://github.com/sriniiyer/codenn/blob/master/summarizing_source_code.pdf)
Requirements
* Torch (http://torch.ch/docs/getting-started.html)
* Cutorch
* antlr4 for parsing C# (pip install antlr4-python2-runtime)
Setup environment
`export PYTHONPATH=~/codenn/src/:~/codenn/src/sqlparse`
`export CODENN_DIR=~/codenn/`
`export CODENN_WORK=./workdir`
Build both csharp and sql datasets
Install modified sqlparse
`cd src/sqlparse/`
`sudo python setup.py install`
Build datasets
`cd src/model`
`./buildData.sh`
Train codenn models and predict on test set
`./run.sh {sql|csharp}`