Machine Learning Classifier
Usage
ml(
text,
model_dir,
class_col = "classification",
map = NULL,
text_col = "text",
return_prob = FALSE
)
Arguments
- text
the text to classify
- model_dir
the directory of the model
- class_col
the name of the classification column
- map
a vector of keys and values (e.g.,
c("0" = "no", "1" = yes")
)- text_col
the name of the text column if text is a data frame
- return_prob
whether to return the probability along with the classification