knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(devtools) devtools::install_github("activetext/activeText")
After installing the package, load it as normal using the library()
function.
library(activeText) devtools::install() library(tidyverse)
Let's take a look at the dataset that we'll use for our demonstration of the package.
activeText::bbc_data_all
The BBC news dataset contains 2,215 news articles that are evenly divided between tech, entertainment, sports, politics, and business. All articles that belong to the politics group are labeled as 1, and all other articles are labeled as 0.
# results <- activeText::active_label( docs = activeText::bbc_data_all, handlabel = FALSE, labels = c("Not Political", "Political"), labels_name = "label", lambda = 0.01, max_active = 10, init_size = 1, max_query = 1 ) # print(results$docs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.