Home

Awesome

TreeCaps: Tree-based Capsule Networks for Source Code Processing

<p aligh="center"> This repository contains the code for TreeCaps introduced in the following paper <b>TreeCaps: Tree-based Capsule Networks for Source Code Processing. (AAAI 2021) </b> </p>

Usage

  1. Install the required dependencies pip install -r requirements.txt.

  2. Download and extract the dataset python3 download_data.py. After this step, you can see OJ_data folder, noted that this data has been parsed into SRCML-based AST (https://www.srcml.org/) as protobuf format.

  3. To train the model:

Datasets

We used 2 datasets in 2 programming languages to ensure cross-language robustness:

Citation

If you find this tutorial useful for your research, please consider citing our paper:

@article{bui2020treecaps,
  title={TreeCaps: Tree-Based Capsule Networks for Source Code Processing},
  author={Bui, Nghi DQ and Yu, Yijun and Jiang, Lingxiao},
  journal={arXiv preprint arXiv:2009.09777},
  year={2020}
}