R Script for language translation within RMarkdown documents -- 3
Budget: €10 – €80 EUR
This project requires knowledge of:
- Markdown and specifically RMarkdown documents
- R
- API calls, e.g. ChatGPT
I have RMarkdown documents, including a lot of text and code chunks in R and Python.
I am looking for someone who can write me a small script that will translate all the text elements from one language to another, e.g. from Spanish to English. The translation can be done e.g. using the DeepL API or the ChatGPT API; if you know other options let me know. A free translation API should be available.
The script should be written in R.
The script should have parameters to specify input and output language. It could start with the folllowing parameters definitions:
input_language = 'es'
input_filename = 'rmarkdown_spanish.Rmd'
output_language = 'en'
output_filename = 'rmarkdown_english.Rmd'
Example: Input file rmarkdown_spanish.Rmd > Output file rmarkdown_english.Rmd.
Code chunks should remain untouched, i.e. variables do not need to be translated. So it is really just about detecting the text elements of RMarkdown (headings, bold, italic, tables, figure captions...) and translating those text elements to another language, keeping all the formats. Therefore I think it will be a small script only.
Some considerations for acceptance:
- Links should still point to the correct adresses, but link text should be translated
- Figure paths should also still point to the correct figure, but figure captions should be translated
- RMarkdown documents should still compile
- Formatting (H1, H2, bold, italic ...) should be retained
Please specify in your offer which translation engine you plan to use (a free API should be available). The timeline for the project is 1 - 2 days.
- Markdown and specifically RMarkdown documents
- R
- API calls, e.g. ChatGPT
I have RMarkdown documents, including a lot of text and code chunks in R and Python.
I am looking for someone who can write me a small script that will translate all the text elements from one language to another, e.g. from Spanish to English. The translation can be done e.g. using the DeepL API or the ChatGPT API; if you know other options let me know. A free translation API should be available.
The script should be written in R.
The script should have parameters to specify input and output language. It could start with the folllowing parameters definitions:
input_language = 'es'
input_filename = 'rmarkdown_spanish.Rmd'
output_language = 'en'
output_filename = 'rmarkdown_english.Rmd'
Example: Input file rmarkdown_spanish.Rmd > Output file rmarkdown_english.Rmd.
Code chunks should remain untouched, i.e. variables do not need to be translated. So it is really just about detecting the text elements of RMarkdown (headings, bold, italic, tables, figure captions...) and translating those text elements to another language, keeping all the formats. Therefore I think it will be a small script only.
Some considerations for acceptance:
- Links should still point to the correct adresses, but link text should be translated
- Figure paths should also still point to the correct figure, but figure captions should be translated
- RMarkdown documents should still compile
- Formatting (H1, H2, bold, italic ...) should be retained
Please specify in your offer which translation engine you plan to use (a free API should be available). The timeline for the project is 1 - 2 days.