inst/plumber_api.R

#* @get /trollR
classify_text <- function(text = "Hello World - Sample Text"){
  library(trollR)

  troll <- predict_troll(text)

  list(
    text = text,
    troll_certainty = troll
  )
}
schliebs/trollR documentation built on May 23, 2019, 2:52 p.m.