Description Usage Arguments Examples
This function allows you to evaluate if a set of text messages constains hate speech. The usage of the function stopPropagHate requires the download of tokenizer and model files to the working directory. For an automatic download and usage without prompt check the function stopPropagHateWithoutPrompt.
1 | stopPropagHate(data_frame, hate_type = "hate", language = "en")
|
data_frame, |
is a data.frame containing a column named "text". |
hate_type, |
is the type of hate you want to measure. It can be general "hate" speech, "sexism" or "racism". |
language, |
we provide this funtion both for Enlish "en" and Portuguese "pt". |
1 2 | texts_data_frame <- data.frame(id = c(1,2,3), texts_data_frame <- data.frame(id = c(1,2,3), text = c("Call me sexist but female sports anchors r the worst. Makes me uncomfortable when women know more about sports than I do", "May Allah bless him with 72 virgin pigs.", "Stop sending me anonymous valentines things. I m pretty sure they are")))
stopPropagHate(texts_data_frame, "hate", "en")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.