Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting whole AST like the paper #13

Closed
zayedupal opened this issue Mar 5, 2019 · 2 comments
Closed

Getting whole AST like the paper #13

zayedupal opened this issue Mar 5, 2019 · 2 comments

Comments

@zayedupal
Copy link

Hi,
I am currently working on a research project regarding code similarity. For that, it would be really helpful for us if we could get the whole AST. From the code, I can get different number attention paths, but not the whole tree like the paper. Any guideline for that is really appreciated.

@urialon
Copy link
Collaborator

urialon commented Mar 6, 2019

Hi Zayed,
The JavaExtractor first parses the code to get the AST, and only then extracts paths.
So instead of extracting paths, you can change the code here:
https://github.com/tech-srl/code2vec/blob/master/JavaExtractor/JPredict/src/main/java/JavaExtractor/FeatureExtractor.java#L40

to print the AST / save it to a file.

@zayedupal
Copy link
Author

Thank you. That was fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants