context("Arguments Check")
library(textwhiz)
df = data.frame(text_id = c(1:3),
text = c("the seahawks are my favorite team.",
"russel wilson should be an mvp",
"seattle are superbowl champions"
),
labels = c("nfl",
"nfl",
"nfl"
))
missing_dim <- expand.grid(
lr = seq(4, 4.3, 0.5),
epoch = seq(30, 33, 10),
ws = seq(4, 6, 2),
wordNgrams = 2,
minn = 2,
maxn = 6
)
test_that("'parameters' argument check", {
expect_error(tune_fasttext(k = 3,
texts = df$text,
text_ids = df$text_id,
labels = df$labels,
parameters = missing_dim))
expect_error(forensic_fasttext(k = 3,
texts = df$text,
text_ids = df$text_id,
labels = df$labels,
parameters = missing_dim))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.