Embeddings for trees
Set of PyTorch modules for developing and evaluating different algorithms for embedding trees.
Requirements
You can install the dependencies by using the requirement list
pip install -r requirements.txt
Although it's better to install PyTorch and DGL manually for correct CUDA support.
Data preprocessing
List of some useful tools for preprocessing source code into a dataset with ASTs:
- ASTMiner - tool for mining raw ASTs and path-based representation of code using ANTLR, GumTree and other grammars.
- PSIMiner - tool for processing PSI trees from IntelliJ IDEA and creating labeled dataset from them.
Model zoo
List of supported algorithms of tree embeddings with links to wiki guides:
Contribution
Supporting different algorithms of encoding and decoding trees is the key area of improvement for this framework. If you have any suggestions or questions, feel free to open issues and create pull requests.