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.11k stars 286 forks source link

I need help with decompose step. #146

Closed ma0889 closed 2 years ago

ma0889 commented 2 years ago

Hello, Thank you for sharing your project with us!! I'm interested in the Code2vec project and I read your paper and I watched the youtube presentation.
I have a concern about the Code2vev project. I'm sorry if my questions are so naive. I have an OpenMP dataset that is written in C I need to convert the code into AST and decompose it to get the vectors. I mean I need to do the first part of the Code2vev project( I have to stop before the aggregating step )

Is there any way to apply code2vec on the OpenMP dataset? How can I use the first part of the code2vec project?

urialon commented 2 years ago

Hi @ma0889 , Thank you for your interest in our work!

You can use https://github.com/JetBrains-Research/astminer which is an external tool to process C files for code2vec.

Best, Uri

ma0889 commented 2 years ago

Hi @urialon

Thank you for your response!

urialon commented 2 years ago

Hi @ma0889 , We just released a model that performs better than OpenAI's Codex for C.

https://arxiv.org/pdf/2202.13169.pdf https://github.com/VHellendoorn/Code-LMs

Best, Uri