predict_troll.Rd
Detect if given texts are trolls
predict_troll(x, model_ = NULL, mdl_data_ = NULL)
x | a vector of text |
---|---|
model_ | a model that is passed to predict, defaults to the |
mdl_data_ | a model as returned by |
a vector with the same lengths as x that holds the predicted probabilities that the given text is trolling
text <- c("You suck, die!", "What a nice world we have today", "I like you", "I hate you") (pred <- predict_troll(text))#> [1] 0.99461335 0.06459010 0.01856389 0.19459596