Code Monkey home page Code Monkey logo

rbert's Introduction

RBERT

Lifecycle: maturing Travis build status AppVeyor build status Codecov test coverage

RBERT is an R implementation of the Python package BERT developed at Google for Natural Language Processing.

Installation

You can install RBERT from GitHub with:

# install.packages("devtools")
devtools::install_github(
  "jonathanbratt/RBERT", 
  build_vignettes = TRUE
)

TensorFlow Installation

RBERT requires TensorFlow. Currently the version must be <= 1.13.1. You can install it using the tensorflow package (installed as a dependency of this package; see note below about Windows).

tensorflow::install_tensorflow(version = "1.13.1")

Windows

The current CRAN version of reticulate (1.13) causes some issues with the tensorflow installation. Rebooting your machine after installing Anaconda seems to fix this issue, or upgrade to the development version of reticulate.

devtools::install_github("rstudio/reticulate")

Basic usage

RBERT is a work in progress. While fine-tuning a BERT model using RBERT may be possible, it is not currently recommended.

RBERT is best suited for exploring pre-trained BERT models, and obtaining contextual representations of input text for use as features in downstream tasks.

  • See the "Introduction to RBERT" vignette included with the package for more specific examples.
  • For a quick explanation of what BERT is, see the "BERT Basics" vignette.
  • The package RBERTviz provides tools for making fun and easy visualizations of BERT data.

Running Tests

The first time you run the test suite, the 388.8MB bert_base_uncased.zip file will download in your tests/testthat/test_checkpoints directory. Subsequent test runs will use that download. This was our best compromise to allow for relatively rapid testing without bloating the repository.

Disclaimer

This is not an officially supported Macmillan Learning product.

Contact information

Questions or comments should be directed to Jonathan Bratt ([email protected]) and Jon Harmon ([email protected]).

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.