-
Notifications
You must be signed in to change notification settings - Fork 144
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
How to add new lanuages #42
Comments
I'll detail the steps you'd need to take to translate from COBOL to python:
Then train a model. At this point the steps are the same as for C++ to Python if you created the datasets properly.
|
@brozi I need a processor for C. Should I follow the same steps? |
Yes and you can probably adapt the C++ processor for C https://github.com/facebookresearch/CodeGen/blob/c83433217fdba964d1f15aa4d45a78c75d6bfa12/codegen_sources/preprocessing/lang_processors/cpp_processor.py |
@brozi Thanks for the quick reply. Would you be willing to share the queries (BigQuery) used to extract monolingual cpp data from the github public dataset? Whitepaper suggests I'll need to do that for C, but can probably reuse the java dataset under |
@raffian @brozi did you ever suss out what the queries should look like? Hoping to leverage this to train a Delphi <-> Python3 transcoder model. Thanks! |
Unfortunately, no - I gave up on this approach. I switched my focus to ANTLR4, it's mature, stable, and comes with lots of grammars for parsing nearly every programming language ever created, though surprisingly Delphi is missing from the list. I found this one - unofficial I guess so your mileage may vary. If you go down the ANTLR4 path for code translation, take my advice and do the training at udemy, it's worth it. Understanding ANTLR fundamentals are essential to using it effectively, otherwise, you'll just get frustrated with it. Good luck, |
Best place to start with ANTLR: https://www.antlr.org/ |
@raffian thanks for the links, will check them out! really hoping to find something that can intelligently perform the translation, or at least a large part of it. |
I am wondering if I can add new lanuages for code translation, for example I want to translate COBOL code to python
Do you have any tips if you can explain briefly that what I should do
The text was updated successfully, but these errors were encountered: