Can anybody suggest to me, where I can find example code for R language for BERT neural network for text mining tasks. All I can see are python examples, and I need R.


You might be interested in the open-source R package RBERT: https://github.com/jonathanbratt/RBERT

It's a work in progress, but the goal is to be able to use BERT directly in R.

  • $\begingroup$ While you'll need python to be installed, you don't need to code in python. RBERT (github.com/jonathanbratt/RBERT) lets you do everything in R. $\endgroup$ – Jon Harmon Sep 13 '19 at 4:01

AFAIK, TensorFlow doesn't have an official R port, and it's written in Python and C++ and CUDA (source). Here are the available libraries as of today:

enter image description here

Even the RStudio/tensorflow package says:

The TensorFlow API is composed of a set of Python modules that enable constructing and executing TensorFlow graphs. The tensorflow package provides access to the complete TensorFlow API from within R.

And points to the Python documentation.

For this reason, I think it's a good example of when to use Python. Moving to Jupyter from RStudio should be quite straightforward, since Jupyter support R and Julia code as well as Python.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy