k4black / codebleu

Pip compatible CodeBLEU metric implementation available for linux/macos/win
https://pypi.org/project/codebleu/
MIT License
60 stars 8 forks source link

Fortran support #51

Open vintriguna opened 3 months ago

vintriguna commented 3 months ago

Hello @k4black , How might I be able to add support for Fortran? Thanks

k4black commented 3 months ago

Hey, You can check how the parsers for the other languages are working and add the Fortran the similar way!

  1. Add tree sitter for Fortran
  2. Write tree parser
  3. Add Fortran constant in available languages
  4. Add tests
  5. Update main and evaluation app readme

It would be great to see you PR!

vintriguna commented 3 months ago

Hey @k4black, Thanks very much for your response. I addressed steps 1, 3, 4, and 5 of your comment, but I am having a little bit of trouble with 2nd step, writing the parser.

I would definitely love to create a PR, but do you know if there are any guides or tutorials I can follow to help guide me in creating the parser? I did read the source code and DFG functions but unfortunately there aren't any comments or documentation so it's a bit difficult to figure out.

If you could point me to any guides/tutorial I would greatly appreciate it and I look forward to submitting a PR soon after. Thank you!

k4black commented 2 months ago

@vintriguna Sorry, not much help here from my side =( This is the original code of the microsoft (yep, no comments and pretty unreadable). I could not point any tutorials, just suggest to start with cpp parser and try to resolve this riddle

vintriguna commented 2 months ago

Hi @yijunyu I noticed you were able to create the Rust parser. I am trying to do the same for Fortran, but I am running into difficulties because of the lack of comments and documentation, so I was wondering if you could point me towards any resources or guides that could be of use? Thank you very much!