This Jupyter Notebook provides a simple yet powerful tool for translating technical documentation (e.g., Markdown files) from English to Russian using the Helsinki-NLP/opus-mt-en-ru
model from Hugging Face.
- Easy Setup: Installs required libraries (
transformers
,sacremoses
) automatically. - Smart Translation: Preserves code blocks, headings, and special Markdown syntax while translating only the text content.
- Google Colab Integration: Upload files directly for translation.
- Upload Your File: Run the notebook in Google Colab and upload your Markdown file.
- Automatic Processing: The tool splits the content into sections (headings, code blocks, text) and translates only the relevant parts.
- Download Results: The translated file is saved with a prefix (e.g.,
NLP_filename.md
).
- Saves Time: No manual copying/pasting of text.
- Context-Aware: Avoids translating code or syntax (e.g.,
```
,# headings
). - Scalable: Works for large documents with mixed content.
- For best results, review the output for technical terms that may need manual adjustment.
- Supports Markdown files but can be adapted for other formats.
Happy translating! 🌍✨