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

is possible add .ipynb translation feature #131

Open
johnfelipe opened this issue Sep 2, 2024 · 4 comments
Open

is possible add .ipynb translation feature #131

johnfelipe opened this issue Sep 2, 2024 · 4 comments

Comments

@johnfelipe
Copy link

04_Energy_Meters_Recognition_CNN.zip

i upload this example
i think this feature will be good for all data scientist with multilanguage needs
Pls tell me how can help

@chriswendt1
Copy link
Member

Hi @johnfelipe , this would be a "local file format". You can add a converter from .ipynb" to Markdown, or to HTML, then have the service translate Markdown or HTML, then convert back to .ipynb in your code. Follow the example for SRT files in the LocalFormats folder.

@chriswendt1
Copy link
Member

Hi @johnfelipe , if you could provide the logic of extracting the translatable elements of the .ipynb file format, that would help.

The currently implemented logic in local file formats is this:

  1. Determine what is translatable text inside the original file. Make sure you keep translatable sentences together.
  2. Pack the relevant non-translatable data into a structure, so that we can restore the original from it and encode it as comment in the Markdown.
  3. Translate the Markdown.
  4. Unpack non-translatable data after translation, restoring the original format.

If the .ipynb format contains more markup than translatable text, I would probably use a different logic of:

  1. Extract the translatable text, replacing it with an identifier in the original format and keep it locally.
  2. Save translatable as Markdown with the identifiers as comments.
  3. Translate the Markdown.
  4. In the file saved in step 1, replace the identifiers with the translated text.

@johnfelipe
Copy link
Author

johnfelipe commented Sep 2, 2024 via email

@chriswendt1
Copy link
Member

Hi @johnfelipe , if you could provide the logic of extracting the translatable elements of the .ipynb file format, that would help.

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