tech-srl / code2vec

TensorFlow code for the neural network presented in the paper: "code2vec: Learning Distributed Representations of Code"
https://code2vec.org
MIT License
1.1k stars 286 forks source link

Code2vec model to generate code comments #108

Closed aishwariyarao217 closed 3 years ago

aishwariyarao217 commented 3 years ago

Hello, I was wondering if it is possible to use the existing code2vec model to generate code comments? I'm aware that code2seq can be used but I wanted to know if I used a dataset such as the one described by Hu et al. in the Deep Code Comment Generation paper and preprocessed it and used it as input to the code2vec model if it'll be able to generate comments for the code snippet or if I will have to use the code vectors in a seq2seq model.

urialon commented 3 years ago

Hi @aishwariyarao217 , Thank you for your interest in code2vec, and sorry for the delayed response. Code2vec doesn't have a decoder, so as you suggest, the best option will be to use code2seq.

Best, Uri

urialon commented 3 years ago

Closing due to inactivity, feel free to re-open.