Coder Social home page Coder Social logo

nb_translator's Introduction

nb_translator

This is a tool to translate markdown descriptions in jupyter notebook files using Google Cloud Translation API.

Installation

Install the nbtl command, and enable the Cloud Translation API. (This assumes the gcloud command is already set up. See below for the detail.)

pip install git+https://github.com/takumiohym/nb_translator.git
gcloud services enable translate.googleapis.com

Note: If you are using this tool outside of the managed Google Cloud notebook envieronment (e.g. Vertex AI Workbench) please install gcp clients and configure the authentication following these documents.

Usage

nbtl <source notebook file> --to <target language code>
[--target_file <target notebook file>] \
[--orig <source language code>] \
[--project_id <your GCP project id>] \
[--region <gcp region>]

Examples

Translate English Notebook file into Japanese (source language is en by default)

nbtl notebook_source_en.ipynb --to ja

Translate Spanish Notebook file into Korean

nbtl notebook_source_es.ipynb --orig es --to ko

References

This tool uses Google Cloud Translation API. Please read these documents and understand the cost and the limitations.

nb_translator's People

Contributors

takumiohym avatar

Stargazers

 avatar

Watchers

 avatar

nb_translator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.