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

Input format option for Jupyter Notebook #860

Open
sfujiwara opened this issue May 7, 2019 · 4 comments
Open

Input format option for Jupyter Notebook #860

sfujiwara opened this issue May 7, 2019 · 4 comments

Comments

@sfujiwara
Copy link

Do you have a plan to implement input format option for Jupyter Notebook?
As far as I know, currently we can not use .ipynb file as an input for RedPen CLI:
http://redpen.cc/docs/latest/index_ja.html#command-line-tool

@sfujiwara
Copy link
Author

sfujiwara commented May 8, 2019

We are currently working on Japanese translation of TensorFlow official document (many of the documents are .ipynb files):
https://github.com/tensorflow/docs/tree/master/site/ja

We are using RedPen to help reviewer.
But, since RedPen does not support Jupyter Notebook, we have to convert it to markdown:
https://github.com/tfug/proofreading

We are very happy if we can apply RedPen directly to Jupyter Notebook.

@takahi-i
Copy link
Member

takahi-i commented May 8, 2019

@sfujiwara Thank you very much for your interest in RedPen 🙏

As you think, currently RedPen does not support .ipynb format and therefore we need to convert the files to markdown to apply RedPen.

To support .ipynb, we first need to the detailed specification of the format. Creating the parser could be simple since as we see, .ipynbcontains the Markdown blocks which RedPen already support the parser.

@sfujiwara
Copy link
Author

I think the parser need to extract "source" elements if "cell_type": "markdown".
An example block we want to extract is below:

https://github.com/tensorflow/docs/blob/392123db72bb67706a9805764b1833cc945b4e18/site/ja/r2/tutorials/keras/basic_classification.ipynb?short_path=6fd7e60#L146-L150

The content of "source" is similar to markdown, but a little bit different from it.

@takahi-i
Copy link
Member

Thank you very much for tell us the format of ipynb files. We understand that the ipynb is a simple json format and can handle source of elements which have cell_type: markdown`.

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