Skip to content

Commit

Permalink
Fix deprecated usages
Browse files Browse the repository at this point in the history
.Rbuildignore .github
  • Loading branch information
Kenneth Benoit authored and Kenneth Benoit committed Oct 16, 2023
1 parent 1f3ad13 commit 26b77d9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^\.Rproj\.user$
README.Rmd
tests/misc/
\.github/
3 changes: 2 additions & 1 deletion R/crossval.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#' @examples
#' library("quanteda")
#' library("quanteda.textmodels")
#' dfmat <- dfm(data_corpus_moviereviews)
#' dfmat <- tokens(data_corpus_moviereviews) |>
#' dfm()
#' tmod <- textmodel_nb(dfmat, y = data_corpus_moviereviews$sentiment)
#' crossval(tmod, k = 5, by_class = TRUE)
#' crossval(tmod, k = 5, by_class = FALSE)
Expand Down
3 changes: 2 additions & 1 deletion man/crossval.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-textmodel_cnnlstmemb.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test_that("the cnnlstmemb model works", {
subset = language == "English") %>%
corpus_sample(500)

toks <- tokens(texts(corp))
toks <- tokens(corp)
label <- ifelse(docvars(corp, "crowd_subsidy_label") == "Pro-Subsidy", 1, 0)
tmod <- textmodel_cnnlstmemb(toks, y = label, epochs = 8)

Expand Down

0 comments on commit 26b77d9

Please sign in to comment.